-
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
Allow forms with dynamic preload data to be bulk finalized #5775
Conversation
override fun create(formDef: FormDef): FormEntryController { | ||
override fun create(formDef: FormDef, formMediaDir: File): FormEntryController { | ||
val externalDataManager = ExternalDataManagerImpl(formMediaDir).also { | ||
Collect.getInstance().externalDataManager = it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really want to get rid of this static state, but I'm worried about the consequences of doing that while #5665 is in flight. I think that kind of improvement should be done as part of that work instead.
99e0065
to
e14f7bf
Compare
collect_app/src/androidTest/java/org/odk/collect/android/support/rules/BlankFormTestRule.kt
Outdated
Show resolved
Hide resolved
Should the validation of a required question in a follow up form for entities work via "Finalize all form"? I can leave the required question empty and save the form, then in Drafts the form is Incomplete but when I tap "Finalize all forms" and the form is finalized. Steps to reproduce:
The form is ready in our test server in project 436 user pulll data. |
I can't think of anything that would cause entities not to work. There's nothing different about them from a validation point of view. Could you try a form with a required Oh, and does the form finalize if you hit "Finalize" in form entry with that question unanswered? |
If I try to swipe to next question or finalize the form with required question unanswered there is a info that it's required so I can't finalize it. I can't finalize it also when I leave the answer empty while I edit in Drafts. |
Updated steps to reproduce the issue mentioned above. Steps to reproduce:
|
@dbemke that's fixed! @grzesiek2010 it's probably worth taking another look as I had to move things around a bit. |
Tested with Success! alongside with @dbemke Verified on devices with Android: 8.1, 10, 12, 13 Verified cases:
|
Allow forms with dynamic preload data to be bulk finalized
Allow forms with dynamic preload data to be bulk finalized
Allow forms with dynamic preload data to be bulk finalized
Work towards #5740
Why is this the best possible solution? Were any other approaches considered?
The simplest thing to do here was to rework how
pulldata
is setup so it happens for both normal and bulk finalization.pulldata
didn't have any existing tests, so I added a new one so the the refactor would be covered.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?
As well as checking that forms with
pulldata
/search
bulk finalize correctly, it's important to check forms that usepulldata
in constraints and check that they fail to bulk finalize in the correct contexts. I don't think it's possible to havesearch
involves in constraints, but happy to be corrected there!Before submitting this PR, please make sure you have:
./gradlew checkAll
and confirmed all checks still pass OR confirm CircleCI build passes and run./gradlew connectedDebugAndroidTest
locally.