-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Xform rendering hides choices when relevance condition and choice filter are applied to a secondary question #5636
Comments
@kitsao Thanks for sharing the sample but it fails to load .. has the form been updated? |
Possibly related: #4249 |
@wtekeu |
@kitsao After doing some research, it looks like this is due to the use of the following skip logic: |
@wtekeu does it work with different relevant conditions, such as |
@abbyad it does work but if you select |
But when you remove the line, it works in both cases. The only drawback is that if you select |
Are you confirming that a valid |
Bumped to 3.8.0 so it doesn't hold up the release. |
No update for some time. Bumping. |
@jkuester - can you tell if the enketo uplift in 4.0 will fix this? If yes, I'll move it there. Thanks! |
@jkuester Any update on this? |
@garethbowen shoot! This fell off my radar somehow. @kitsao, sorry to resurrect this ancient history, but I am having some trouble recreating this and was wondering if you could give me access to the Google xlsx form that you linked in the original issue (if it still exists). I have requested access via the link already. I tried cobbling together a form based on a combination of the PIH |
Okay, spoke too soon! I realized that my test form did not have anything set for the Here is the most basic config that I have come up with that demonstrates the issue:
The best I can tell, what seems to be happening in the old version of Enketo is that the order of evaluations gets confused so the This is what I see when running the above form on And this is what I see on |
Great! I'll move this issue to 4.0.0 to line up with the upgrade. Thanks. |
@medic/quality-assurance this issue is ready for AT on #7256 |
@tatilepizs here is the xml for a sample for that you can use to test this behavior: <?xml version="1.0"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms">
<h:head>
<h:title>Enketo Widgets</h:title>
<model>
<itext>
<translation lang="en">
<text id="/enketo_widgets/my_group/my_repeat/my_question:label">
<value>You should be able to see the choices</value>
</text>
<text id="/enketo_widgets/my_group/question_count:label">
<value>Repeat Count</value>
</text>
<text id="static_instance-yes_no-0">
<value>Yes</value>
</text>
<text id="static_instance-yes_no-1">
<value>No</value>
</text>
<text id="static_instance-yes_no-2">
<value>Don't Know</value>
</text>
<text id="static_instance-yes_no-3">
<value>Not Applicable</value>
</text>
</translation>
</itext>
<instance>
<enketo_widgets id="enketo_widgets" prefix="J1!enketo_widgets!" delimiter="#" version="2022-08-16 00:00:00">
<my_group>
<question_count/>
<my_repeat_count/>
<my_repeat jr:template="">
<my_question/>
</my_repeat>
</my_group>
<meta tag="hidden">
<instanceID/>
</meta>
</enketo_widgets>
</instance>
<instance id="contact-summary"/>
<instance id="yes_no">
<root>
<item>
<itextId>static_instance-yes_no-0</itextId>
<name>yes</name>
</item>
<item>
<itextId>static_instance-yes_no-1</itextId>
<name>no</name>
</item>
<item>
<itextId>static_instance-yes_no-2</itextId>
<name>dk</name>
</item>
<item>
<itextId>static_instance-yes_no-3</itextId>
<name>na</name>
</item>
</root>
</instance>
<bind nodeset="/enketo_widgets/my_group/question_count" type="int"/>
<bind nodeset="/enketo_widgets/my_group/my_repeat_count" type="string" readonly="true()" calculate=" /enketo_widgets/my_group/question_count "/>
<bind nodeset="/enketo_widgets/my_group/my_repeat" relevant=" /enketo_widgets/my_group/question_count != 0"/>
<bind nodeset="/enketo_widgets/my_group/my_repeat/my_question" type="select1" relevant="true()"/>
<bind nodeset="/enketo_widgets/meta/instanceID" type="string" readonly="true()" calculate="concat('uuid:', uuid())"/>
</model>
</h:head>
<h:body class="pages">
<group appearance="field-list" ref="/enketo_widgets/my_group">
<input ref="/enketo_widgets/my_group/question_count">
<label ref="jr:itext('/enketo_widgets/my_group/question_count:label')"/>
</input>
<group ref="/enketo_widgets/my_group/my_repeat">
<label ref="jr:itext('/enketo_widgets/my_group/my_repeat:label')"/>
<repeat nodeset="/enketo_widgets/my_group/my_repeat" jr:count=" /enketo_widgets/my_group/my_repeat_count ">
<select1 ref="/enketo_widgets/my_group/my_repeat/my_question">
<label ref="jr:itext('/enketo_widgets/my_group/my_repeat/my_question:label')"/>
<itemset nodeset="instance('yes_no')/root/item[true()]">
<value ref="name"/>
<label ref="jr:itext(itextId)"/>
</itemset>
</select1>
</repeat>
</group>
</group>
</h:body>
</h:html> |
Config: Default The file used to test was provided by @jkuester in this comment Reproducible on
|
Describe the bug
Choices for a secondary
select_one/select_multiple
field do not show when both relevance condition and choice filter are applied. Consider the following design xls immunization section:To Reproduce
Steps to reproduce the behavior:
Expected behavior
The expected behavior is to have the doses (choices) showing appropriately, as shown below. This happens when I either remove the relevance condition or the choice filter.
Logs
No logs on browser console.
Screenshots
See captures above.
Environment
Additional context
This was experienced in 3.3.0 too. The workaround applied is merging vaccines and doses, i.e. instead of asking to select dose say for OPV, have vaccines as OPV 1, OPV 2 and OPV 3 ...
cc @derickl @smbuthia
Why Now?
Partner(s): Internal
Reason(s): A partner will have CHWs/Supervisors with a detrimental experience, thus providing bad care
The text was updated successfully, but these errors were encountered: