-
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
Prevent bulk finalization on instances with save points #5766
Conversation
@@ -450,6 +455,25 @@ abstract class Page<T : Page<T>> { | |||
return this as T | |||
} | |||
|
|||
fun <D : Page<D>?> killAndReopenApp(destination: D): D { |
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.
This is copied over from master
.
@@ -62,6 +66,17 @@ object FormEntryUseCases { | |||
) | |||
} | |||
|
|||
fun getSavePoint(formController: FormController, cacheDir: File): File? { |
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.
We should be able to use this in other places we grab save point files, but I'll leave out that refactor for the moment to avoid the risk of merge conflicts that it'd introduce.
Is this correct that now all forms in the Drafts tab has status "incomplete"? |
@srujner it's definitely possible to test it without that merging, but I do agree that it's going to be far less confusing so let's go with that. |
8cf7659
to
38e65f9
Compare
38e65f9
to
5169805
Compare
What is the state of a form with a save point which was opened and the changes were discarded? If I follow the steps from the AC and then open the form (with save point) and discard changes it’s possible to finalize it by "Finalize all forms”. Does the state of the form change if the changes were discarded? Steps to reproduce:
|
The save point will be deleted won't it? So it should finalize successfully. |
It is. Ahhh I get it.. so opening and discarding changes the form with a save point "removes the save point" and the introduced changes in a save point |
Tested with Success! Verified on device with Android 10 Verified cases:
|
Tested with Success! Verified on device with Android 13 |
Prevent bulk finalization on instances with save points
Prevent bulk finalization on instances with save points
Prevent bulk finalization on instances with save points
Closes #5739
What has been done to verify that this works as intended?
New tests
Why is this the best possible solution? Were any other approaches considered?
Not a lot to discuss here! Was very simple given the we are just failing to finalise for instances with save points.
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?
Just checking the feature is implemented as described should be enough here. If there are any ideas around ways to break it then feel free to play around with that as well though!
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.