Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Date constraints should include call on date #197

Open
lognaturel opened this issue Mar 1, 2018 · 2 comments
Open

Date constraints should include call on date #197

lognaturel opened this issue Mar 1, 2018 · 2 comments
Labels
Projects

Comments

@lognaturel
Copy link
Member

Currently date constraints have XML output that looks like
"(. >= '2018-01-01') and (. <= '2018-03-31')"

The XML output should instead be something like
constraint="(. >= date('2018-01-01')) and (. <= date('2018-03-31'))"

Reported at https://forum.opendatakit.org/t/problem-with-constraint-on-date-widget/12029/

@2math
Copy link

2math commented Mar 12, 2018

It is strange, that when I change the XForm to constraint="(. >= date('2018-03-01’)) and (. <= date('2018-03-30’))” , then there is a parse error

System.err: org.xmlpull.v1.XmlPullParserException: Attr.value missing f. jr:itext (position:START_TAG <bind nodeset='/data/select_date' type='date' constraint='(. >= date('2018-03-01’)) and (. <= date('2018-03-30’))” jr:constraintMsg=' jr:itext='jr:itext('/data/group_items/input_number:constraintMsg')'>@149:154 in java.io.InputStreamReader@419a26e)

@2math
Copy link

2math commented Mar 12, 2018

Currently woks only with : constraint="(. >= 17590) and (. <= 17620)"
As double number which is "The number of days (as a double precision floating point) since the Epoch"

issa-tseng added a commit to issa-tseng/odkbuild that referenced this issue Mar 6, 2019
issa-tseng added a commit to issa-tseng/odkbuild that referenced this issue Mar 6, 2019
issa-tseng added a commit to issa-tseng/build2xlsform that referenced this issue Mar 6, 2019
@florianm florianm added this to To do in Roadmap Dec 9, 2021
@florianm florianm added the bug label Dec 9, 2021
@florianm florianm moved this from To do to Backlog in Roadmap Dec 14, 2021
@florianm florianm moved this from Backlog to To do in Roadmap Dec 14, 2021
@florianm florianm moved this from To do to Backlog in Roadmap Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Roadmap
Backlog
Development

No branches or pull requests

3 participants