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

core/merge: Update remote metadata of trashed docs #2260

Merged
merged 1 commit into from Sep 15, 2022

Conversation

taratatach
Copy link
Member

@taratatach taratatach commented Sep 15, 2022

Since trashing a document on the remote Cozy changes its CouchDB
revision, we need to store this updated metadata in our local PouchDB.
This makes future changes on the remote doc and detecting that the
trashed remote document is up-to-date possible.

We were updating the remote revision only when the doc had previously
been moved and that move wasn't synchronized yet.
We're now saving the complete updated remote metadata whenever merging
a document trashing (this includes the trashed attribute).

Please make sure the following boxes are checked:

  • PR is not too big
  • it improves UX & DX in some way
  • it includes unit tests matching the implementation changes
  • it includes scenarios matching a new behaviour or has been manually tested
  • it includes relevant documentation

  Since trashing a document on the remote Cozy changes its CouchDB
  revision, we need to store this updated metadata in our local PouchDB.
  This makes future changes on the remote doc and detecting that the
  trashed remote document is up-to-date possible.

  We were updating the remote revision only when the doc had previously
  been moved and that move wasn't synchronized yet.
  We're now saving the complete updated remote metadata whenever merging
  a document trashing (this includes the `trashed` attribute).
@taratatach taratatach self-assigned this Sep 15, 2022
@taratatach taratatach merged commit 30c1aa3 into master Sep 15, 2022
@taratatach taratatach deleted the fix/save-updated-side-when-merging-doc-trashing branch September 15, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant