getodk / briefcase

ODK Briefcase is a Java application for fetching and pushing forms and their contents. It helps make billions of data points from ODK portable. Contribute and make the world a better place! ✨💼✨
https://docs.getodk.org/briefcase-intro
Other
60 stars 156 forks source link

Never randomize choice lists to ensure stable export order #864

Closed lognaturel closed 4 years ago

lognaturel commented 4 years ago

Closes #862

What has been done to verify that this works as intended?

Wrote and ran automated test. I also used the form linked in the issue discussion to send real submissions and verify the behavior at the command line with the smart append feature. However, the problem really ended up being just about the interaction with choice list randomization and the split select multiples feature.

Why is this the best possible solution? Were any other approaches considered?

The way that choice list randomization is implemented in JavaRosa is admittedly a hack. It's the best we could come up with at the time and I took advantage of that approach to ensure that the randomization never happens when using Briefcase. I don't love that this means I'm using a public boolean field on ItemsetBinding but I don't see an alternative and I think it can be revised if ever the JavaRosa implementation is improved.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

The only intended change is to fix the bug. The only code change is to set the ItemsetBinding.randomize field to false. I don't see any risk.

Does this change require updates to documentation? If so, please file an issue at https://github.com/opendatakit/docs/issues/new and include the link below.

No.