Closed GoogleCodeExporter closed 9 years ago
By defaulting to string, we can inadvertently assume a numeric or boolean field
is a string value. The biggest issue is with calculated fields -- the eIMCI
form has many of these for numeric fields (e.g., computed dosing levels) and
also for boolean conditions. These don't have types defined in the form, and
would be loaded as string values unless their types can be determined.
AFAIK, there is no way to ask JR statically what type a resulting calculation
is, so I can't determine this outside of requiring an explicit type=""
declaration. If there is an API to determine the type of a calculated field,
most of the data types could be determined and there would be less conversion
pain involved.
Original comment by mitchellsundt@gmail.com
on 2 Aug 2011 at 5:42
the plan going forward is to as follows:
aggregate's form upload will show warnings if a form isn't properly typed, but
will accept the form.
collect and validate will show warnings if form isn't valid (according to
aggregate's new rules).
we will make no changes to core, but will instead wrap the jr library with
aggregate's parsing.
Original comment by yanokwa
on 3 Aug 2011 at 2:16
Now displays warning message with the list of form fields that don't have types.
Treats these as string values.
Original comment by mitchellsundt@gmail.com
on 16 Aug 2011 at 10:56
Original issue reported on code.google.com by
yanokwa
on 1 Aug 2011 at 9:33