Catch missing configuration row for external choices#6794
Merged
grzesiek2010 merged 5 commits intogetodk:masterfrom Nov 20, 2025
Merged
Catch missing configuration row for external choices#6794grzesiek2010 merged 5 commits intogetodk:masterfrom
grzesiek2010 merged 5 commits intogetodk:masterfrom
Conversation
lognaturel
requested changes
Aug 22, 2025
Member
lognaturel
left a comment
There was a problem hiding this comment.
Some details about how I think we should address this at #6792 (comment)
9814dab to
376f1f6
Compare
lognaturel
reviewed
Oct 15, 2025
collect_app/src/main/java/org/odk/collect/android/dynamicpreload/ExternalDataUtil.java
Show resolved
Hide resolved
lognaturel
reviewed
Oct 15, 2025
test-forms/src/main/resources/forms/dynamic_and_static_choices.xml
Outdated
Show resolved
Hide resolved
lognaturel
requested changes
Oct 15, 2025
Member
lognaturel
left a comment
There was a problem hiding this comment.
Couple of changes requested inline!
lognaturel
approved these changes
Nov 18, 2025
|
The apk has been removed. Could you run the build again? |
Member
Author
|
It should be there now. |
|
Tested with Success! Verified on Android 10 Verified cases:
|
|
Tested with success Verified on Android 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6792
Why is this the best possible solution? Were any other approaches considered?
The issue was that thepopulateExternalChoicesmethod, which is responsible for reading from external CSV files, returned internal choices if they existed for values represented as integers: 08fcc82#diff-5dca0a8d3dc453ec1b67830005c61a9c5a3e4d845c06181cff53506e36c3680dL175However, this method should always read from the CSV file, as that is its intended purpose.
I'm not really sure why it was implemented in this way.It turned out that tearting numeric choices in a different way is a feature - see comments in #6792.
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?
Playing with forms that read choices from external files is what we need to test here to make sure there is no regression introduced.
Do we need any specific form for testing your changes? If so, please attach one.
I've used: dynamic_and_static_choices.xlsx
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No.
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest(or./gradlew testLab) and confirmed all checks still passDateFormatsTest