Skip to content
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

ODK Collect can generate +Inf/-Inf/NaN values that will not parse upon submission to ODK Aggregate #1116

Closed
mitchellsundt opened this issue Jul 9, 2015 · 4 comments

Comments

@mitchellsundt
Copy link
Contributor

mitchellsundt commented Jul 9, 2015

Migrated to getodk/aggregate#63 by spacetelescope/github-issues-import

Originally reported on Google Code with ID 1115

It is possible for a form to emit numeric values for +/- infinity and NaN.

These do not parse in ODK Aggregate because Double.valueOf() doesn't parse them.

Reported by mitchellsundt on 2015-03-03 16:50:29

@MartijnR
Copy link
Contributor

MartijnR commented Aug 15, 2016

Migrated to opendatakit/aggregate#63 (comment) by spacetelescope/github-issues-import

Is there a way forward to resolve this?

Enketo Aggregate responds with a 500 error if 'NaN' is the value for an integer field.

MartijnR added a commit to enketo/enketo-core that referenced this issue Aug 15, 2016
MartijnR added a commit to enketo/enketo-core that referenced this issue Aug 15, 2016
This workaround doesn't really solve much, because calculations (for now) always have type=string in XLSForms. The only use case for the ODK Aggregate bug that it works around is where a readonly decimal or integer input has a calculation attached to it, or a handcoded XForm that has type=integer, or type=decimal for a calculation. Too obscure to work around.

getodk/getodk#1116
MartijnR added a commit to enketo/enketo-express that referenced this issue Aug 29, 2016
added: optional ability to add repeat ordinal attributes to model in enketo namespace
changed: alidation logic refactored and behaviour for required field validation sligthly changed. If a required has a value and is then emptied, the background will turn red.
removed: workaround for ODK Aggregate bug getodk/getodk#1116 because it doesn't really solve anything.
fixed: fragile namespace handling in model.
MartijnR added a commit to enketo/enketo-express that referenced this issue Aug 30, 2016
added: optional ability to add repeat ordinal attributes to model in enketo namespace
changed: validation logic refactored and behaviour for required field validation sligthly changed: if a required has a value and is then emptied, the background will turn red.
removed: workaround for ODK Aggregate bug getodk/getodk#1116 because it doesn't really solve anything.
fixed: fragile namespace handling in model.
@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Oct 8, 2016

Migrated to opendatakit/aggregate#63 (comment) by spacetelescope/github-issues-import

I don't have time to look at this.

From my ODK 2.0 work, I found that the code needs to do a
Double.valueOf(string) in the conversion, and this will properly preserve
NaN, etc.

Not sure where this problem is happening. Does it happen across all
database layers? Might help isolate where the problem is.

On Mon, Aug 15, 2016 at 11:06 AM, Martijn van de Rijdt <
notifications@github.com> wrote:

Is there a way forward to resolve this?

Enketo Aggregate responds with a 500 error if 'NaN' is the value for an
integer field.


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#1116 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACLO09bOEGNdYJwhG2mRz7koePB0qSPqks5qgKqNgaJpZM4Jknla
.

Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Nov 4, 2016

Migrated to opendatakit/aggregate#63 (comment) by spacetelescope/github-issues-import

I have changes in ODK Aggregate (1.4.13) to allow this to work in Google AppEngine.
It will not work in MySQL or Microsoft SQLServer (the database does not support this).
In PostgreSQL, it could work, but requires manual modification of any column where data that might have these values would be stored (changing the data type from DECIMAL() to DOUBLE PRECISION()).

@MartijnR
Copy link
Contributor

MartijnR commented Nov 4, 2016

Migrated to opendatakit/aggregate#63 (comment) by spacetelescope/github-issues-import

That's great!

All set for calculated integers and decimals now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants