-
Notifications
You must be signed in to change notification settings - Fork 28
5535 Exclude requisition made from web entries in mSupply #5536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5535 Exclude requisition made from web entries in mSupply #5536
Conversation
no migration code need for cleaning blank requisition since we need to re-initialize mobile app from the sync server anyway so all of those blank requisitions will be handled there
TestingTested in given APK
Tests
|
…s deletion action for foreign objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over all looks good to me.
As seen while testing wp status requisition seems valid requisition with status fn and also can see linked response requisition and related requisition lines. So not sure should we deleted or if its valid then improve it looking at the response requisition? |
update : was able to set up the Master mobile... I am using Node V14.21.3 ( think this is the best that we can do for now ) |
@raviSussol : The testing I have done, looks positive... Now I think what we need is a big Group test from @santoshkhanal12 and @AnushaUp and perhaps a few one of of us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved : But we do need to do a group test to make sure that daily activities are not messed up.
Yes that would be great to have other functional or regression tests before releasing the new version. |
…record to the msupply server
@@ -631,6 +631,7 @@ Transaction.schema = { | |||
mode: { type: 'string', default: 'store' }, | |||
prescriber: { type: 'Prescriber', optional: true }, | |||
linkedRequisition: { type: 'Requisition', optional: true }, | |||
pendingRequisitionId: { type: 'string', optional: true, indexed: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bro got LLM'd? I can't find an indexed
property in the realm docs and we've never set this anywhere else in the schema for this repo. That said, I'm surprised realm didn't throw a wobbly, either I haven't found the docs or realm is ignoring this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a real property of realm js schema. https://www.mongodb.com/docs/realm-sdks/js/latest/types/Realm.PropertySchema.html. Agree that it hadn't been used before (maybe cause in the lower version before Mongodb owned Realm)? Although I was searching using LLMs for field indexing in the realm (to make realm query quicker for processing huge requisitions like some of our clients have Fiji, Png, CIV, etc) I had literally looked around their official docs to make sure that its not an LLM hallucination until I found that docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to make realm query quicker for processing huge requisitions like some of our clients have Fiji, Png, CIV, etc
Are we having performance issues on mobile ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh yea I think I wasn't going deep enough couldn't find it in here which is where my initial googling took me, https://www.mongodb.com/docs/atlas/device-sdks/sdk/react-native/. Well I did end up first on some ancient version of the type docs you found like v0.7... thought it looked odd, the OG realm docs were much cleaner than any incarnation that MongoDB has created since 🙄 especially when they're trying to stuff this new Atlas thing down people's throats but have since deprecated it lol.
That said just found it in the proper docs! Not sure how I missed it before, though even if you search for it you get results mostly for their PHP Library first haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to make realm query quicker for processing huge requisitions like some of our clients have Fiji, Png, CIV, etc
Are we having performance issues on mobile ?
I haven't caught that so far but I basically used indexed
property as an idea of relational database here in this case since pendingRequisitionId
is a mirror representation (or foreign field) of Requisition.id
(unlike an entire record object linked to a field) which is a primary key and has indexed
property true by default.
Fixes #5535
Change summary
wp
andwf
statuses from requisition schema and its related method to stop processing incoming requisitions made from web entries in the mSupply.Transaction
& 'Requisiton` objects they have been broken from #5406 don't create blank supplier requisitions #5407Testing
Steps to reproduce or otherwise test the changes of this PR:
Brand new mobile setup
Samabula_pharm
store's siteMobile upgrade setup
v8.6.8
v8.7.0
scheduler_processMessages
schedulerthisisnepal123
enter that and clickExport Data
Tests
Test 1
Should not display blank or having serial number 0 requisition
Also check the customer requisition - should not have any blank or having serial number 0 requisition
Please do regression tests related requisitions (both customer and supplier)
Test 2
All blank requisitions will be gone in the mobile and requisitions having
wp
status will also be gone from the mSupplyTest 3
In the
Requisition
object goto thelinkedTransaction
field where you can see linked transaction records in itSimilarly, in the
Transaction
object goto thelinkedRequisition
field where you can see linked requisition records in there