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

Don't update entity if it doesn't exist in the list #6153

Merged
merged 4 commits into from
May 29, 2024

Conversation

seadowg
Copy link
Member

@seadowg seadowg commented May 23, 2024

Closes #6031
Closes #6109
Blocked by getodk/javarosa#763

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

Not a lot to discuss here! We'd previously exposed the entity "action" from JavaRosa, but weren't using it yet. The big change here is that we detect if the entity doesn't exist if the action is "update" and skip saving.

Additionally, we ignore saving entities that don't have an ID to fix #6109.

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 a fairly small set of change, so just testing the issues are fixed is probably enough here.

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

@seadowg seadowg force-pushed the entity-update branch 2 times, most recently from bce9bfd to 250aa91 Compare May 27, 2024 12:46
@seadowg seadowg removed the blocked label May 27, 2024
@seadowg seadowg force-pushed the entity-update branch 2 times, most recently from 50d6fb6 to 250aa91 Compare May 27, 2024 13:37
@seadowg seadowg marked this pull request as ready for review May 27, 2024 13:38
@seadowg seadowg requested a review from grzesiek2010 May 27, 2024 13:38
@grzesiek2010 grzesiek2010 merged commit d67e55a into getodk:master May 29, 2024
6 checks passed
@seadowg seadowg deleted the entity-update branch May 29, 2024 09:54
@WKobus
Copy link

WKobus commented Jun 5, 2024

Tested with success!

Verified on a device with Android 14

Verified cases:

@srujner
Copy link

srujner commented Jun 5, 2024

Tested with success! with @dbemke

Verified on a device with Android 10,13

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