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

Changes to a read-only contact locally does not reset the contact to server version when "collection sync" is used #849

Open
2 tasks done
rfc2822 opened this issue Jun 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@rfc2822
Copy link
Member

rfc2822 commented Jun 12, 2024

Problem scope

  • I'm sure that this is a DAVx⁵ problem.

App version

  • I'm using the latest available DAVx⁵ version.

Android version and device/firmware type

No response

Steps to reproduce

Use Case: A read-only address book is shared with several team members, so that everyone has the correct contacts.

Since there is no way to practically lock contents of an address book under Android users can still edit contacts, but they are reverted to the servers version of the contact after sync. This only happens when the server does not use the "Collection Sync" method.

Actual result

If one user has accidentially edited the contact and the server uses "Collection Sync" the changed contact is only reverted to the original version when the contact is edited on the server. If this specific contact is never changed on the server the locally edited contact will never be reverted, because Collection Sync only transmits the changed contents, and not the whole address book at once.

Expected result

No response

Further info

No response

@rfc2822 rfc2822 added the bug Something isn't working label Jun 12, 2024
@sunkup
Copy link
Member

sunkup commented Jun 26, 2024

Does not the Sync Adapter Framework tell us when a contact changed? Instead of pushing those changes to the server (which we don't, since it's read-only) we could reset the whole collection in question.

@rfc2822
Copy link
Member Author

rfc2822 commented Jun 30, 2024

Does not the Sync Adapter Framework tell us when a contact changed? Instead of pushing those changes to the server (which we don't, since it's read-only) we could reset the whole collection in question.

Yes, we do a re-sync in this case already. However the problem is the the sync doesn't delete local changes when the "collection sync" algorithm is used.

Do you mean that we shouldn't call "the sync" when a contact is changed in a "read-only" address book, but some other code that resets the collection so that it's completely re-synced?

I think in the read-only address book with changed items case, we should:

  1. prevent local changes from being uploaded (as we already do),
  2. enforce SyncAlgorithm.PROPFIND_REPORT – this would notice items which are not on the server and delete them locally.

@sunkup
Copy link
Member

sunkup commented Jul 1, 2024

Do you mean that we shouldn't call "the sync" when a contact is changed in a "read-only" address book, but some other code that resets the collection so that it's completely re-synced?

My initial idea, yes, but I see now that would be hard to implement, since we do not know the original state of the contact - that is, never kept a copy (and don't want to).

enforce SyncAlgorithm.PROPFIND_REPORT – this would notice items which are not on the server and delete them locally.

Sounds like a proper work around 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants