-
Notifications
You must be signed in to change notification settings - Fork 27
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
base: develop
Are you sure you want to change the base?
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.
Makes sense so updating transaction so we dont create any blank requisiton in future and also updating requisition and deleting that too...
if (record.store_ID !== settings.get(THIS_STORE_ID)) break; // Not for this store | ||
|
||
const status = REQUISITION_STATUSES.translate(record.status, EXTERNAL_TO_INTERNAL); | ||
if (!status) break; // Must be a requisition status, either 'suggested' or 'finalised' |
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.
Nice so we will not proceed if desired status is not received.
@@ -142,12 +142,11 @@ export const NAME_TYPES = new SyncTranslator({ | |||
*/ | |||
class RequisitionStatusTranslator extends SyncTranslator { | |||
translate(status, direction) { | |||
if (['cn', 'wf'].includes(status)) return 'finalised'; | |||
if (status === 'cn') return 'finalised'; |
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.
Nice
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.
@@ -286,6 +286,45 @@ const dataMigrations = [ | |||
clearNumberSequences(database); | |||
}, | |||
}, | |||
{ | |||
version: '8.7.0', |
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.
@raviSussol : I was thinking still WP is mysterious but we are known with another case of creating blank requisition. Is there a place where it can check blank so we dont need to make everytime migrate code?
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. |
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