-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
The value from jr:choice-name()
can be stale
#3281
Labels
Enketo
Affects Enketo forms
Priority: 1 - High
Blocks the next release.
Type: Bug
Fix something that isn't working as intended
Milestone
Comments
abbyad
added
Type: Bug
Fix something that isn't working as intended
Enketo
Affects Enketo forms
labels
Mar 24, 2017
Test form, which is also temporarily accessible here: <?xml version="1.0"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<h:head>
<h:title>Test Issue 3281</h:title>
<model>
<instance>
<issue-3281 delimiter="#" id="issue_3281" prefix="J1!issue_3281!" version="2017-03-24">
<input>Default Value</input>
<translator>clinic</translator><output/><debug/>
<note/>
<meta>
<instanceID/>
</meta>
</issue-3281>
</instance>
<bind nodeset="/issue-3281/input" type="string"/>
<bind nodeset="/issue-3281/translator" type="select1"/>
<bind calculate="jr:choice-name( /issue-3281/translator ,' /issue-3281/translator ')" nodeset="/issue-3281/output" type="string"/>
<bind nodeset="/issue-3281/debug" readonly="true()" type="string"/>
<bind nodeset="/issue-3281/note" readonly="true()" type="string"/>
<bind calculate="concat('uuid:', uuid())" nodeset="/issue-3281/meta/instanceID" readonly="true()" type="string"/>
</model>
</h:head>
<h:body>
<input ref="/issue-3281/input">
<label>Input</label>
</input>
<select1 ref="/issue-3281/translator">
<label>Translator</label>
<item>
<label>[<output value=" /issue-3281/input "/>] District</label>
<value>district_hospital</value>
</item>
<item>
<label>[<output value=" /issue-3281/input "/>] Health Center</label>
<value>health_center</value>
</item>
<item>
<label>[<output value=" /issue-3281/input "/>] Area</label>
<value>clinic</value>
</item>
</select1>
<input ref="/issue-3281/debug">
<label>jr:choice-name($ {translator},'$ {translator}') = **<output value=" /issue-3281/output "/>**</label>
</input>
<input ref="/issue-3281/note">
<label>The value above is stale if _Input_ is changed and you leave the textbox since it modifies the choice label for _Translator_ but not the value. The choice-name function gets updated if the choice value is modified, but should also update if the choice label changes.</label>
</input>
</h:body>
</h:html> Tested on 2.10.1 |
Required by 2017-03-30. |
|
alxndrsn
added a commit
that referenced
this issue
Mar 29, 2017
alxndrsn
added a commit
that referenced
this issue
Mar 30, 2017
garethbowen
pushed a commit
that referenced
this issue
Mar 30, 2017
Seems to be working well in 2.10.3-beta. Moving to Ready. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Enketo
Affects Enketo forms
Priority: 1 - High
Blocks the next release.
Type: Bug
Fix something that isn't working as intended
The value from a
jr:choice-name()
calculation is stale if the choice label is changed but the choice value is not. The choice-name function should be rerun if either the choice value or label are changed.Will post test form shortly.
The text was updated successfully, but these errors were encountered: