[BUG] Card sync does not work as expected

Aperta
#657 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
android, ios

Direzione di ricerca

Inizia riproducendo la sequenza in sei passaggi per Android, WebDAV e iOS descritta nell’issue e verifica lo stato risultante della cartella remota. Usa gli scenari indicati di updated_time e sync_time come criteri di accettazione: le eliminazioni remote devono rimanere eliminate dopo la sincronizzazione iOS e le schede locali in conflitto devono essere conservate in una cartella conflicts.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Which app is your issue for

CardWallet

Version

1.12.2

What platform are you using?

iOS

OS Version

26.4.2

What happened?

iOS card sync overwrites remote state
STR:

  1. On Android, create a 2 cards in 1 folder.
  2. Add sync to webdav, then click "sync"
  3. On a fresh iOS device, add webdav and click "sync". Observe both cards being downloaded.
  4. Back on Android, delete one of the cards, click "sync"
  5. Verify that the cards are deleted by opening the sync folder in the webdav client and seeing that there is only one folder (= 1 card data) in the sync folder.
  6. Open iOS app, click "sync"

EXP: Remote changes from Android get pulled in, only 1 card remains
ACT: iOS state overwrites remote state, the card that was deleted gets re-uploaded to the webdav folder.

What I expect is that the priority (local vs remote state) get determined based on 2 timestamp fields: updated_time and sync_time, set on each of the cards both locally and on a remote.
Scenario A (Upload): Device A looks at a card and sees updated_time is newer than its last sync_time. It checks remote, and the remote version hasn't changed (remote sync_time = local sync_time). The Device A simply overwrites the file in the remote.
Scenario B (Download): Device B checks remote and finds a card where the remote updated_time is newer than Device B local sync_time. The Device B downloads it and updates its local database.
In case local updated_time is newer than local sync_time and remote sync_time is newer than local sync_time - a conflict is detected, remote changes are pulled and overwrite local changes, and also a new folder conflicts is created, and the local version of a conflicting card is moved there.
I hope it makes sense.

Code of Conduct
  • I agree to follow this project's Code of Conduct
Lingua principale
C++
Stelle
2.7k
Fork
153
Merge medio
9h 56m
PR unite (30g)
121

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ossappscollective/OSS-DocumentScanner

Tutte le issue di ossappscollective/OSS-DocumentScanner

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.