-
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
Handle not existing forms and form files during bulk finalize #5835
Conversation
It looks like this will show the finalization attempt as failed but won't give any context as to why, is that right? The user won't have any hints about what happened or how they could fix it? Is that better than just crashing? |
collect_app/src/main/java/org/odk/collect/android/formentry/FormEntryUseCases.kt
Outdated
Show resolved
Hide resolved
Great, I didn’t think through what they’d see if they try to open the form. Makes sense! |
daf1bcb
to
fed5b7d
Compare
On Android 10 and 13 after reproducing steps from the issue there is a crash.
|
What exactly are you removing? Only the XML file or something else? I've just tried and everything seems to be fine. |
I removed just the Xml document from the Files -> projects -> Name of the project -> instances -> Name of the form. I tried only on Android 13 so far |
That's a completely new case different than those two I've described in the issue. But ok we can handle this one too. |
So what's the one mention in here: Deleting the whole folder? |
No, the difference is that I said: delete the file from the forms subdirectory and you removed the one from the instances subdirectory. So instead of removing the blank form file, you removed the filled form file. |
Yes, those are edge cases and not errors in forms themselves so it's ok as it is.
I would say yes. The message could be better maybe but is not that bad if a user reads it, it's possible to figure out the reason. |
Tested with Success! Verified on device with Android 13 Verified cases:
|
Tested with Success! Verified on device with Android 10 |
Handle not existing forms and form files during bulk finalize
Handle not existing forms and form files during bulk finalize
Closes #5833
Why is this the best possible solution? Were any other approaches considered?
Nothing to discuss here.
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?
This should only fix the crashes mentioned in the issue and have no side effects. I can't think of any risk here.
Do we need any specific form for testing your changes? If so, please attach one.
No.
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 checkAll
and confirmed all checks still pass OR confirm CircleCI build passes and run./gradlew connectedDebugAndroidTest
locally.