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

Save Question variable name to published form XML #3101

Closed
stellanl opened this issue May 21, 2019 · 5 comments
Closed

Save Question variable name to published form XML #3101

stellanl opened this issue May 21, 2019 · 5 comments
Assignees

Comments

@stellanl
Copy link
Contributor

stellanl commented May 21, 2019

This will help with analysis format exports after #2285, as the variable name can currently only be found in volatile form in the datastore.

@valllllll2000 , would adding variableName as an attribute of the <question> tag break anything in the app?

@stellanl stellanl self-assigned this May 21, 2019
@valllllll2000
Copy link
Contributor

valllllll2000 commented May 21, 2019

@stellanl it seems at first glance that no, it will not break anything, but I want to test to make sure. Here is an example of form I will try:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<survey name="Testing Variable Name" defaultLanguageCode="en" version='1.0' app="akvoflow-uat1" surveyGroupId="147842013" surveyGroupName="New survey">
<questionGroup>
<heading>survey 2 group</heading>
<question order="1" type="free" mandatory="true" localeNameFlag="false" id="144962013" variableName="SOME_NAME"><text>survey 2 question 1</text>
</question>
</questionGroup>
</survey>

does that sound right?

@stellanl
Copy link
Contributor Author

Perfect.

@stellanl
Copy link
Contributor Author

stellanl commented May 21, 2019

Variable names must match /^[A-Za-z0-9_-]*$/ so should be ok as-is in an attribute.

@valllllll2000
Copy link
Contributor

ok so I tried adding that file as bootstrap, all worked as expected

@stellanl
Copy link
Contributor Author

stellanl commented May 22, 2019

Test plan:

  1. Publish a form that has a variable name set for one of the questions.
  2. Fetch the generated XML file from S3 (URL is in Messages list) and see that it was included.

@muloem muloem added this to the 1.9.47 T... T... milestone May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants