-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Use raw values, not display text, for Entity property values #6514
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
test-forms/src/main/resources/forms/entities-with-dates-follow-up.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?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:odk="http://www.opendatakit.org/xforms" xmlns:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:entities="http://www.opendatakit.org/xforms/entities"> | ||
<h:head> | ||
<h:title>Entities With Dates Follow Up</h:title> | ||
<model odk:xforms-version="1.0.0" entities:entities-version="2024.1.0"> | ||
<instance> | ||
<data id="entities-with-dates-follow_up" version="1"> | ||
<label/> | ||
<date/> | ||
<meta> | ||
<instanceID/> | ||
</meta> | ||
</data> | ||
</instance> | ||
|
||
<instance id="dates" src="jr://file-csv/dates.csv"/> | ||
|
||
<bind nodeset="/data/label" type="string"/> | ||
<bind nodeset="/data/date" type="string"/> | ||
<bind jr:preload="uid" nodeset="/data/meta/instanceID" readonly="true()" type="string"/> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<select1 ref="/data/label"> | ||
<label>Select label</label> | ||
<itemset nodeset="instance('dates')/root/item"> | ||
<value ref="name"/> | ||
<label ref="label"/> | ||
</itemset> | ||
</select1> | ||
<select1 ref="/data/date"> | ||
<label>Select date</label> | ||
<itemset nodeset="instance('dates')/root/item"> | ||
<value ref="name"/> | ||
<label ref="date"/> | ||
</itemset> | ||
</select1> | ||
</h:body> | ||
</h:html> |
44 changes: 44 additions & 0 deletions
44
test-forms/src/main/resources/forms/entities-with-dates-registration.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?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" | ||
xmlns:odk="http://www.opendatakit.org/xforms" | ||
xmlns:entities="http://www.opendatakit.org/xforms/entities"> | ||
<h:head> | ||
<h:title>Entities With Dates Registration</h:title> | ||
<model odk:xforms-version="1.0.0" entities:entities-version="2024.1.0"> | ||
<itext> | ||
<translation lang="English"> | ||
<text id="/data/date:label"> | ||
<value>Select date</value> | ||
</text> | ||
</translation> | ||
</itext> | ||
<instance> | ||
<data id="entities-with-dates-registration"> | ||
<date>2024-11-15</date> | ||
<meta> | ||
<instanceID/> | ||
<entity dataset="dates" id="" create="1"> | ||
<label/> | ||
</entity> | ||
</meta> | ||
</data> | ||
</instance> | ||
<bind nodeset="/data/date" type="date" entities:saveto="date"/> | ||
<bind nodeset="/data/meta/instanceID" type="string" readonly="true()" jr:preload="uid"/> | ||
<bind nodeset="/data/meta/entity/@id" type="string" readonly="true()"/> | ||
<setvalue ref="/data/meta/entity/@id" event="odk-instance-first-load" type="string" readonly="true()" value="uuid()"/> | ||
<bind nodeset="/data/meta/entity/label" calculate=" /data/date " type="string" readonly="true()"/> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<input ref="/data/date"> | ||
<label ref="jr:itext('/data/date:label')"/> | ||
</input> | ||
</h:body> | ||
</h:html> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a problem with saving dates as labels. I fixed it here: https://github.com/getodk/collect/pull/6514/files#diff-dcf4e4fc03ff048616e3d821f4dc1ff53ea090480626d6516d0ac054b35c1446R35 but the problem is that such an element is identified as
DateTime
data type not justDate
. It seems to be a bug in javarosa so I'm going to file an issue there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is here: getodk/javarosa#807