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

Support ref in constraint and required messages with single language #487

Merged
merged 2 commits into from
Dec 7, 2020

Conversation

lognaturel
Copy link
Contributor

Closes #474

Why is this the best possible solution? Were any other approaches considered?

Discussed approach in the issue and @MartijnR agreed identifying ${} references and forcing itext creation in that case was our best bet.

In terms of implementation, I tried to reduce redundancy in this section but I couldn't come up with any approach that would be easy to read. I think this is ok because the conditions are linear and read well.

I considered adding tests for relative references in repeats but I think that's sufficiently covered elsewhere and should Just Work.

What are the regression risks?

Everything I added is in a conditional so I think risks are minimal. The worst risk is probably that I would have forgotten some cases.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No, this is a bug fix.

Before submitting this PR, please make sure you have:

  • included test cases for core behavior and edge cases in tests_v1
  • run nosetests and verified all tests pass
  • run black pyxform to format code
  • verified that any code or assets from external sources are properly credited in comments

Copy link
Contributor

@MartijnR MartijnR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Looks great to me. Did some real-life testing.

@lognaturel lognaturel merged commit 071b661 into XLSForm:master Dec 7, 2020
@lognaturel lognaturel deleted the issue-474 branch December 7, 2020 22:38
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

Successfully merging this pull request may close these issues.

If constraint_message includes a ${} reference and no translations, expanded XPath path should be in <output>
2 participants