Enable LocalEntitiesInstanceProvider only if a form uses entities#6908
Enable LocalEntitiesInstanceProvider only if a form uses entities#6908grzesiek2010 wants to merge 3 commits intogetodk:masterfrom
Conversation
175a46c to
9dc716e
Compare
|
At first, the issue seemed pretty straightforward based on the description, but it turned out to be more complex. In Javarosa, choices are loaded without any awareness of entities - it treats all choices the same way. I believe that was intentional, and we don’t want to change this by passing the In Collect, we have Given that, the simplest solution I can think of is to introduce something similar to what we did for enabling/disabling entities in the settings. There, we had a function that determined whether What do you think about this approach @seadowg? |
seadowg
left a comment
There was a problem hiding this comment.
I've realized that I don't think this entirely solves the problem sadly: you could still have a form that uses an entity list, but also has a non entity list CSV that clashes with an entity list in the project. That's definitely an edge case, but I think the flow in the issue is as well.
I think to fully solve this we really need to be able to have access to information about the media file we're referencing (through a MediaFileRepository) for example. This is something that we've talked about on and off, but it's always been hard to justify. Maybe we should bite the bullet here? This could be a good issue to drive that out.
Closes #6425
Why is this the best possible solution? Were any other approaches considered?
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?
Do we need any specific form for testing your changes? If so, please attach one.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest(or./gradlew testLab) and confirmed all checks still passDateFormatsTest