-
Notifications
You must be signed in to change notification settings - Fork 227
Leading zeros lost from version
when listing blank forms
#327
Comments
Thanks for reporting the issue, @cooperka! I know that Aggregate converts the version to a number to decide if an incoming form is newer than an already existing one. What you report looks like Aggregate is storing the numeric representation instead of storing the literal version number coming on the blank form. There are some things that come to mind:
|
Thanks @ggalmazor. In my opinion, not having delved much into the documentation, it seems like we should either treat the version as a number or a string, and only store it once. A. If it's a number, and we disallow any letters, stripping the zeros seems fair, but it should be documented that the version is simply a number and nothing more Requiring the version to be numeric but also allowing leading zeros seems like a complexity not worth supporting to me. |
From what I gather looking to Aggregate's code, in This is what the specs say about the
It looks like Aggregate is not conforming to spec... |
I agree with that assessment and with @cooperka's proposed approaches. That said, I'm not sure whether it's high priority since it's such an unusual case and has not been reported by a user. |
After studying this, and discussing it with @yanokwa and @lognaturel, it looks like an intervention to change how Aggregate deals with versions would be too risky at this moment. For the moment, we've reviewed all the documentation available in search for spots where language should be changed and/or information should be added. |
Re-filing getodk/collect#2296 under this repo.
Software and hardware versions
Aggregate v1.6.1
Problem description
Leading zeros are lost from version numbers when listing blank forms from the Aggregate API. For example, version
0001
is transmitted as simply1
.Steps to reproduce the problem
The response sent back from the server for the Multi Warning form is:
Whereas e.g.
<version>500001</version>
is correct when the leading character is non-zero.Expected behavior
Leading zeros should not be lost.
The text was updated successfully, but these errors were encountered: