New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removes need for report xml attachments #7596
Conversation
* Pause video and audio when nav to next and prev pages in a form coverage unit test * Feedback * fix unit tests
Hey @jkuester . Would you mind having a look at this? I'm worried I might be missing some key feature here :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I have spent a bunch of time digging into this and I love it! The implementation is simple and elegant, but should have a huge positive impact on the amount of storage used by the DB! I also really appreaciate the work that went into all the tests. ❤️
I left some comments inline, mostly minor except the one regarding the forms2sms.service
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ship it!
…attachment # Conflicts: # api/package-lock.json # config/default/forms/app/delivery.xlsx # config/default/forms/app/delivery.xml # config/default/forms/contact/PLACE_TYPE-create.xlsx # config/default/forms/contact/clinic-create.xml # config/default/forms/contact/district_hospital-create.xml # config/default/forms/contact/health_center-create.xml # config/default/forms/contact/person-create.xlsx # config/default/forms/contact/person-create.xml # config/default/forms/contact/person-edit.xlsx # config/default/forms/contact/person-edit.xml # config/standard/forms/app/immunization_visit.xlsx # tests/e2e/forms/submit-default-delivery-form.specs.js # tests/e2e/submit-enketo-form.wdio-spec.js # tests/page-objects/forms/default-delivery-report.po.js # tests/page-objects/forms/photo-upload.wdio.page.js # tests/page-objects/reports/reports.wdio.page.js # webapp/package-lock.json # webapp/package.json # webapp/src/js/enketo/file-manager.js # webapp/src/js/enketo/medic-xpath-extensions.js # webapp/src/js/enketo/widgets/db-object-widget.js # webapp/tests/mocha/unit/enketo/medic-xpath-extensions.spec.js
…attachment # Conflicts: # tests/e2e/protractor/forms/submit-default-delivery-form.specs.js # tests/e2e/protractor/forms/submit-photo-upload-form.spec.js # tests/e2e/protractor/forms/submit-z-score-form.spec.js
Description
Instead of relying on xml attachments, uses report fields to populate form model on report edits.
Some changes have been required:
bindJsonToXml
is refactored so it treats arrays (repeats) correctly.Limitations:
Reports created as extra docs might not always be faithful to the model of the form itself.
Also migrates a bunch of e2e tests from protractor to wdio.
#5549
Code review checklist
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.