OpenClinica / enketo-oc

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

Add autoqueries for non-strict required and non-strict constraint when user clicks Complete #117

Open pbowen-oc opened 4 years ago

pbowen-oc commented 4 years ago

We want to allow users to add autoqueries for non-strict required errors and non-strict constrain errors when marking an incomplete form Complete. Until now autoqueries were only added when a user used the Closed button.

AC1: When a user opens an incomplete form in edit mode (whether a new form or existing record, and whether with RFCs enabled or not) and clicks the Complete button, the user will first be asked to confirm that they want to mark the form complete. AC2: If the user chooses not to continue with the form completion, they will be returned to the form for data entry. AC3: After confirming marking the form complete, if there are any items or groups with strict required errors, strict constraint errors, relevant errors, or missing reason for change values on the form, the user will see a message informing them that they need to correct the errors before marking the form complete. After acknowledging this message, the user will be returned to the form for data entry. AC4: After confirming marking the form complete, if there are no items or groups with strict required errors, strict constraint errors, relevant errors, or missing reason for change values, but there are items with non-strict required errors or non-strict constraint errors, the user will be prompted to add autoqueries to the fields with errors. AC5: If the user chooses not to continue with adding autoqueries, they will be returned to the form for data entry. AC6: If the user chooses to add autoqueries, each item with a non-strict required error or non-strict constraint error will have an autoquery added to it. AC7: After autoqueries are added, the form will be marked complete and then closed.

pbowen-oc commented 3 years ago

Good issue for new engineer.

pbowen-oc commented 2 years ago

Updated description to note that this applies to the new non-complete forms with RFCs (#490) and added missing reason for change values to AC3 and AC4 as a condition that would prevent proceeding and adding autoqueries.