Testing this scenario as user srmanager2, while Brandon completed the same scenario as an offline user:
As an offline user, I want to be warned if my requisition data entry has a conflict when I re-connect to the network so that I can resolve any conflict and ensure my data is stored into OpenLMIS.
A requisition that has been worked on offline will be considered void and overwritten by the server version, if the local version's `date_modified` timestamp no longer matches server version's `date_modified` timestamp.
The expected result was: If an offline requisition is attempting to sync with the server version of the requisition, and the requisition `date_modified` timestamps of the don't match, THEN the offline requisition is removed from the browser and replaced by the server version. I expected an error message describing a synch conflict error.
Instead: I received an error message that says "You are not authorized to perform this action."
please let us know what is up with this error.
someone probably submitted requisition while Sam was offline and srmanager2 is not authorized to update submitted requisitions. I will make some fixes that will improve UX. Sync conflict error is fixed by
, yes we intentionally did exactly that because we were testing the error message and behaviors. We want to make sure the experience to the user makes sense when that happens.
Okay, described scenario is fixed. From now, when user is not authorized to update submitted requisition but requisition is already submitted by someone else, the modal: "You are not authorized to perform this action" and error : "This requisition has changed status or you lost the rights required for syncing it; the server version will be used." appeared.