OpenClinica / enketo-oc

OpenClinica's fork of the Enketo web forms monorepo
Apache License 2.0
0 stars 1 forks source link

Investigate possibility of forms to be completed with data that had not submitted successfully #70

Open pbowen-oc opened 2 years ago

pbowen-oc commented 2 years ago

We can't reproduce this, but there are reports that forms have been completed with a null required item (and no query add for it) and a value in an item that is relevant only when the required item is non-null. If not for a major processing flaw in Enketo, it seems like this would only be possible if the user entered a value in the required item but it did not submit successfully. The next item would have become relevant and had data entered and submitted successfully and the the user completed the form. The expectation would be that the value that if it failed to submit a value then that value would remain in the submission queue and the the user would not be able to complete the form while there was an unsubmitted value in the submission queue.

This was reported both before and after the submission queue refactor that resolved the rare submission failure on some devices.

MartijnR commented 2 years ago

The only way this seems possible is if the timestamps for 2 question value changes are the same in milliseconds. So that is not possible if a user empties the required manually but perhaps (though very unlikely) if the clearing happens programmatically (i.e. by form logic).