You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A calculation such as decimal-date-time(concat( /data/year ,"-01-01")) can result in an exception if /date/year is left blank or otherwise invalid. However, that exception doesn't occur on finalization so a form can be submitted with a bad value.
This is really a form design issue and /data/year should have a constraint on it. However, the form probably should not be finalizable if the value can't be used. I think there are similar cases with trying to access values in a repeat without specifying a repeat instance.
I'm not 100% sure this is a JavaRosa issue. It might also have to do with how Collect catches JR exceptions.
Steps to reproduce the problem
In a form like the following, clear out the year value:
Software versions
All versions
Problem description
A calculation such as
decimal-date-time(concat( /data/year ,"-01-01"))
can result in an exception if/date/year
is left blank or otherwise invalid. However, that exception doesn't occur on finalization so a form can be submitted with a bad value.This is really a form design issue and
/data/year
should have a constraint on it. However, the form probably should not be finalizable if the value can't be used. I think there are similar cases with trying to access values in a repeat without specifying a repeat instance.I'm not 100% sure this is a JavaRosa issue. It might also have to do with how Collect catches JR exceptions.
Steps to reproduce the problem
In a form like the following, clear out the
year
value:Expected behavior
Forms that throw exceptions during form filling can't be finalized.
CC @seadowg
The text was updated successfully, but these errors were encountered: