Skip to content
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

Jackson XML publishing missing elements/attributes #3316

Closed
7 tasks done
muloem opened this issue Nov 21, 2019 · 6 comments
Closed
7 tasks done

Jackson XML publishing missing elements/attributes #3316

muloem opened this issue Nov 21, 2019 · 6 comments
Assignees
Labels
Milestone

Comments

@muloem
Copy link
Member

muloem commented Nov 21, 2019

The newly implemented Jackson XML publishing from #3115 has some attributes missing or wrongly configured. We will track and fix them here

  • the registrationSurveyId attribute is missing from the <survey></survey> element
  • when set Variable name: variableName="SomeVar" is missing from xml
    the expected would be <question order="1" type="free" mandatory="true" localeNameFlag="false" id="381322013" variableName="SomeVar">
  • the app attribute is missing from the <survey> element
  • Options renderType="radio" is missing but it is not used on the app
  • Also allowMultiple is not set for option questions.
  • Barcodes: when we select allow multiple barcodes this does not work on the app, the flag allowMultiple="true" is not set. Do we actually need multiple Barcode scans in one question?
  • repeatable attribute for QuestionGroup is set even in cases where its false. We dont include it when its false.
@muloem
Copy link
Member Author

muloem commented Nov 21, 2019

Do we actually need multiple Barcode scans in one question?

We will have to evaluate that but for now maintain the functionality as was.

@janagombitova
Copy link
Contributor

@muloem to react to your question:

Do we actually need multiple Barcode scans in one question?

I say no mostly because we should stick to the rule, one answer = one value, so if you need to scan more things, that should be handled with multiple barcode questions. I am also not sure how barcodes are actually used in the field. I only know one case where: the barcode is attached to an e.coli water quality sample bag and the code is scanned to Flow, so after the incubation time you can register the result to the proper data point.

Ideally, we would check if and how this question type is used on partner instances and limit to only one barcode per answer (if the data proves this assumption right)

muloem added a commit that referenced this issue Nov 22, 2019
* Rearranging attributes of the XMLForm class to match to the same order in which were generated in the `<survey>` element of the previous XMLForm generation code
* Modify the expected string output in the test classes to match the rearranged attributes.
valllllll2000 pushed a commit that referenced this issue Nov 25, 2019
…tes-order

[#3316] Refactor XMLForm survey attributes order
valllllll2000 added a commit that referenced this issue Nov 25, 2019
fixed them all to avoid copy pasting the same error again
@stellanl
Copy link
Contributor

stellanl commented Nov 25, 2019

Which allowMultiple is not set for option questions? Pretty sure the one in the options container is set.

valllllll2000 pushed a commit that referenced this issue Nov 25, 2019
[#3316] fix repeatable group should not be set when false
stellanl added a commit that referenced this issue Nov 25, 2019
stellanl added a commit that referenced this issue Nov 25, 2019
valllllll2000 added a commit that referenced this issue Nov 25, 2019
* avoid NPE translation map
* add tests
* return default renderType
* reorder fields as were before
stellanl added a commit that referenced this issue Nov 25, 2019
stellanl added a commit that referenced this issue Nov 26, 2019
stellanl added a commit that referenced this issue Nov 26, 2019
@muloem muloem added this to the 1.10.1 milestone Nov 26, 2019
@muloem muloem modified the milestones: 1.10.1, 1.10.1.1 Dec 5, 2019
@muloem muloem added the Backend label Dec 10, 2019
@valllllll2000
Copy link
Contributor

valllllll2000 commented Dec 17, 2019

There are still some difference

Do not create any issues on the Android app:

  • registrationSurveyId attribute is missing from the element, this item is also missing from 10.1 version
  • repeatable attribute for QuestionGroup is set even in cases where its false. We dont include it when its false.

@muloem
Copy link
Member Author

muloem commented Dec 17, 2019

I feel pretty certain that I did the work on registrationSurveyId. I will crosscheck that

muloem added a commit that referenced this issue Dec 17, 2019
valllllll2000 pushed a commit that referenced this issue Dec 17, 2019
[#3316] Add registration survey attribute to XML form
stellanl added a commit that referenced this issue Dec 17, 2019
[#3316] fix for non repeatable groups survey xml files
@valllllll2000
Copy link
Contributor

All fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants