OpenClinica/enketo-express-oc

Closing non-complete record should ignore any (strict or non-strict) required errors.

Closed this issue · 8 comments

cannot reproduce with empty record: http://localhost:8005/single/fs/i/YYpM?ecid=1

also not with editing an existing non-complete record:

curl --user enketorules: -d "server_url=http://localhost:3000&form_id=vitals&ecid=1&instance=<demo-vitals-grid xmlns:oc=\"http://openclinica.org/xforms\"  xmlns:enk=\"http://enketo.org/xforms\" ><page2><bp_rg></bp_rg></page2><meta><instanceID>uuid:1234</instanceID></meta></demo-vitals-grid>&instance_id=a" http://localhost:8005/oc/api/v1/instance/edit

@pbowen-oc, can you please share an Enketo URL (path alone, and without queryparameters and ID would work) at which you see this issue?

@pbowen-oc, just pinging about this

/single/fs/c/i

Looks like the issue is when a strict required is in an error state. It should just ignore that for non-complete records.

Note, it looks like this logic to throw an error upon Close if there are strict violations was intended for Participate (though it is shown for non-Participate views now).

@pbowen-oc , as you mentioned, this check/error should be removed for close, but could you confirm that it is also not required for Participate?

@MartijnR - The popup is still needed for Participate view since the user must fix the issues to leave in that view (no queries are possible). Note that the issue is still occurring for non-Participate views now (see duplicate issue #634).

Thanks,

My previous work was done in a separate branch (because of the pending question), so that makes sense you're still seeing it.

Looks good in testing