Skip to content
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

Fixed removing savepoints on finalize #6427

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Sep 23, 2024

Closes #6285

Why is this the best possible solution? Were any other approaches considered?

If an error occurs while finalizing a form that requires encryption, the form is saved as a draft. In this case, the existing savepoint should be removed. That's why I have achieved by improving the logic in
https://github.com/getodk/collect/pull/6427/files#diff-ace02871a97e4eac36ebcb210c7538fc66f3d712ff27ae490e423efecbfddbd9R260

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?

We need to test that savepoints are properly removed when saving a form, whether it's during finalization or while the user is filling out the form and clicks the save icon. I can't think of anything else that could be affected.

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:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • added any new strings with date formatting to DateFormatsTest
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010 grzesiek2010 marked this pull request as ready for review September 23, 2024 10:30
@grzesiek2010 grzesiek2010 merged commit 2d8bafd into getodk:master Sep 24, 2024
6 checks passed
@dbemke
Copy link

dbemke commented Sep 25, 2024

@grzesiek2010 I'm not sure what is the expected behavior in this case?
Steps to reproduce:

  1. Download the project from the issue with Birds form.
  2. Set manual update mode.
  3. Fill Birds form and send it.
  4. Go to "Delete form- Blank forms" and delete Birds (blank) form.
  5. Go to "Drafts" and open the saved Birds form - there isn't the recovery dialog but the data is there.
    After our conversation I think it's expected

@grzesiek2010
Copy link
Member Author

Yes the latest data should be saved after clicking finalize/send so there is no need to have a savrpoint.

@WKobus
Copy link

WKobus commented Sep 27, 2024

Tested with Success

Verified on device with Android 14

Verified cases:

@dbemke
Copy link

dbemke commented Sep 27, 2024

Tested with Success

Verified on device with Android 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unnecessary savepoint in a sent form without a specified instance ID
4 participants