-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
Adding XML Version #7319
Adding XML Version #7319
Conversation
@@ -570,6 +571,7 @@ export class EnketoService { | |||
.map((idx, element) => { | |||
const docToStore:any = this.enketoTranslationService.reportRecordToJs(getOuterHTML(element)); | |||
docToStore._id = getId(Xpath.getElementXPath(element)); | |||
docToStore.xmlVersion = xmlVersion; |
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.
I know this is a draft, but I thought I'd throw a comment in...
This is setting the xmlVersion
in the child docs being created by the report but not in the report itself. This is potentially useful but we don't store anything about how the child doc was created, not even the form ID, so it's potentially not useful on its own. The primary place this should be set is in the create
function where the report itself is created, right beside where we set the form
property.
For CouchDB properties we use snake case for naming (like reported_date
below). This applies to both the form and report docs. There are some couterexamples you can find but we're standardising at least on new properties.
Finally I'm not sure xmlVersion
will make much sense to someone looking at the report who doesn't know the context. I think form_version
would be better and be obvious when stored beside form
(the form's ID).
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.
Thanks. So I understand, the change I made in medic/cht-conf#431 will cause the get(internalId)
function here to return a doc Promise that contains the new field xmlVersion
that I add in medic/cht-conf#431
Is that correct?
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.
Yes it should do! You'll obviously need to get the CHT running in a developer environment to test this end to end.
This comment was marked as resolved.
This comment was marked as resolved.
143d862
to
bdd9228
Compare
This comment was marked as resolved.
This comment was marked as resolved.
318b770
to
7381c54
Compare
d6bcc60
to
5c67053
Compare
This comment was marked as resolved.
This comment was marked as resolved.
a78fd0a
to
5610117
Compare
6235de0
to
9c42e10
Compare
Fix tests
…en submitting form (#7532) Ticket: #7529 This commit: - Increases the Enketo's upload file size limit to 30MB, leaving a couple of megas for other things. - Adds a validation that sums all form's attachments and ensures it's not more than 30MB. - Shows error message to the user when limit is exceeded by using the snackbar.
* update share-lib/bulk-docs-utils * update share-lib/calendar-interval * update share-lib/cht-script-api * update share-lib/contact-types-utils * update share-lib/infodoc * update share-lib/lineage 1 of 2 * update share-lib/lineage 2 of 2 * update share-lib/message-utils * update share-lib/outbound * update share-lib/phone-number * update share-lib/purging-utils * update share-lib/registration-utils * update share-lib/rules-engine * update share-lib/search * update share-lib/server-checks * update share-lib/settings * update share-lib/task-utils * update share-lib/tombstone-utils * update share-lib/transitions * update share-lib/translation-utils * update share-lib/validation * update share-lib/view-map-utils * fix lodash mismatch in share-lib/rules-engine * update admin dependencies * revert lodash in admin * dependencies for api 1 of 2 * update sentinel dependencies * update webapp minor dependencies * revert @medic file:.. dependency in message-utils per feedback * un-revert @medic file:.. dependency in message-utils b/c build broke * update version in package and lock to 3.15.0 * right proper revert @medic file:.. dependency in message-utils per feedback
Fixing unit test Fixing unit tests Fix Linting Fixing unit tests
e2710d7
to
ac8137f
Compare
ac8137f
to
60ef1f5
Compare
Description
medic/cht-conf#395
#7561
Code review checklist
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.