Open eprager412 opened 10 months ago
likely same as OpenClinica/enketo-oc#25. To investigate
curl --user enketorules: -d \
"server_url=http://localhost:3000&form_id=simplesignature&ecid=1&instance_id=a&instance=\
<data xmlns:OpenClinica=\"http://openclinica.com/odm\" xmlns:enk=\"http://enketo.org/xforms\" xmlns:jr=\"http://openrosa.org/javarosa\" xmlns:oc=\"http://openclinica.org/xforms\" xmlns:orx=\"http://openrosa.org/xforms\" id=\"simplesignature\" version=\"BTest2\">\
<group_zt8fu31_002>\
<Patient_Signature_002_001>signature-14_12_44.png</Patient_Signature_002_001>\
</group_zt8fu31_002>\
<group_ar1jd35>\
<note/>\
</group_ar1jd35>\
<meta>\
<instanceID>uuid:376611b3-1506-4c11-b21a-3a246f6574f2</instanceID>\
</meta>\
</data>\
&instance_attachments[signature-14_12_44.png]=http://localhost:3000/form/simplesignature/media/signature-14_12_44.png" \
http://localhost:8005/oc/api/v1/instance/note/c
I was able to reproduce this.
Describe the bug When you submit a data signature on a multi page form, and open the form to view after completing, the signature data will be resubmitted as a new .png file without the user interacting with it at all.
To Reproduce Steps to reproduce:
Open attached form in mode /single/full/participant/ simplesignature.txt
Sketch a value in the '####Signature" item
Click away and ensure the value submits successfully
Complete the record
Open the form in review-only mode with the instance from above with view /edit/fs/dn/c/i/
Expected behavior No saved changes and only 1 .png file.
Actual behavior: The form immediately initiates a submission for the signature item and then shows "All changes saved" message. Since the form is opened in review-only mode there should be no item data submissions at all. There also should be no submissions for the signature item without the user interacting with it even if the form were opened in edit mode.
Screenshots Note the signature shown in the screenshots was a full name and now is a zoomed in version of the left hand corner of the original. That is logged as OpenClinica/enketo-oc#25 .