fix: no labels visible for randomized selects with translations#764
Conversation
- regression seems to be from pyxform/XLSForm#746 where the choices may be referenced by the survey only and the select question does not have a reference. This happens if the question is randomized, or external select, or search appearance. - this would suggest that maybe the choices should be in-line for randomized choices - however the existing tests for randomize expect an itemset in the body. Also, these new tests pass on tag 3.0.1 (prior to XLSForm#746), and fail on master (e0b350b).
lognaturel
left a comment
There was a problem hiding this comment.
Thanks for spotting this on the forum and for the speedy fix!
Do you mean directly as children of the question? That wouldn't work with the way randomization currently works -- it relies on an
Yes, exactly. It's to catch issues like this one as early as possible. Should we add this to the readme, maybe? The only place I can think of where it's documented is here (ODK internal)
Ahhh, we have various staging servers. 🙈 That one reflects the latest Central but doesn't also update pyxform. The user was using the pyxform staging server. |
Per report in https://forum.getodk.org/t/54492
Why is this the best possible solution? Were any other approaches considered?
As mentioned above I wasn't totally sure that these combinations are supported, considering enketo/enketo#322 but it seems like it works in Collect (per https://forum.getodk.org/t/42506/4) and presumably will in Webforms too. Also I wasn't able to locally reproduce the ODK Validate warnings mentioned in the reporting forum thread but maybe the Validate version on xlsform-online is out of sync?
What are the regression risks?
This should be a fix since the existing tests pass and the new code satisfies tests that worked on earlier code (as described above), and the code committed in between didn't intend to change randomize or choice_filter behaviour for users.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No
Before submitting this PR, please make sure you have:
testspython -m unittestand verified all tests passruff format pyxform testsandruff check pyxform teststo lint code