-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Copy link
Milestone
Description
Expected Behaviour
Given a form with calculated attributes, when editing a submission the attributes should be set to the value of the original form submission.
Observed Behaviour
The attribute is blank.
Reproduction Steps
Form (XML or XLSX file):
<?xml version="1.0"?>
<h:html
xmlns="http://www.w3.org/2002/xforms"
xmlns:entities="http://www.opendatakit.org/xforms/entities"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:jr="http://openrosa.org/javarosa"
xmlns:odk="http://www.opendatakit.org/xforms"
xmlns:orx="http://openrosa.org/xforms"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<h:head>
<h:title>Neighborhood pet: add</h:title>
<model entities:entities-version="2022.1.0" odk:xforms-version="1.0.0">
<instance>
<data id="pets_add" version="20231204203009">
<species/>
<name/>
<block/>
<meta>
<instanceID/>
<entity create="1" dataset="pets" id="">
<label/>
</entity>
</meta>
</data>
</instance>
<bind entities:saveto="species" nodeset="/data/species" required="true()" type="string"/>
<bind nodeset="/data/name" required="true()" type="string"/>
<bind entities:saveto="likely_block" nodeset="/data/block" type="string"/>
<bind jr:preload="uid" nodeset="/data/meta/instanceID" readonly="true()" type="string"/>
<bind calculate="1" nodeset="/data/meta/entity/@create" readonly="true()" type="string"/>
<bind nodeset="/data/meta/entity/@id" readonly="true()" type="string"/>
<setvalue event="odk-instance-first-load" readonly="true()" ref="/data/meta/entity/@id" type="string" value="uuid()"/>
<bind calculate=" /data/name " nodeset="/data/meta/entity/label" readonly="true()" type="string"/>
</model>
</h:head>
<h:body>
<input ref="/data/species">
<label>Species</label>
</input>
<input ref="/data/name">
<label>Name</label>
</input>
<input ref="/data/block">
<label>Likely block of residence</label>
</input>
</h:body>
</h:html>Steps:
- Submit the form. Because the entity id is generated on
odk-instance-first-loadthis gets set with a uuid. - Edit the form.
- Submit the form again. The entity id should be the same as the value in 1. It's actually blank.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done