-
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
Dates saved to offline Entity properties have the wrong format when used in XPath expressions #6510
Comments
@lognaturel
Could you tell something more about this crash? I haven't experienced it at least using my forms: #6514 |
Yes, same with labels which are system-known properties. Your fix looks right to me. Were you able to reproduce the crash with the form I linked to? The issue is that there’s a format-date call on the property value that was saved so if that is not formatted correctly the function throws an exception. |
Did you put any values in the Entity List? You should be able to use the values in the facilities sheet to download a CSV and populate |
Very interesting! I think that might happen when the Entity List is empty. Maybe when you're ready to look at it again with fresh eyes you can add some facilities to the list. The form isn't expected to work with no facilities specified. |
Intriguing! Ok, I'll look into it a bit as well and let you know if I see anything interesting. |
We figured this out -- the Entity List wasn't attached to the form because a static CSV was. Now it's crashing as expected. 🎉 |
ODK Collect version
v2024.1.0 beta 8
Problem description
When an offline update is made to an Entity and this update represents a date, the date is converted to DD/MM/YY HH:MM format instead of remaining in ISO 8601 format. This means that any expressions trying to use that date crashes. This is a local-only issue: once the Entity is updated on the server and synced back to the device, everything works as expected.
Steps to reproduce the problem
offline
column on the entities sheet and that its value is set toyes
Expected behavior
Entity properties should always be treated as opaque strings. They should be saved and retrieved exactly as entered into the form.
Other information
Something along the way is detecting a date and reformatting it. I don't think it's sqlite because I'm pretty sure sqlite stores dates in iso8601 format.
The text was updated successfully, but these errors were encountered: