Page 1 of 1

Lost note data on "complete"

PostPosted: Sun 3. Feb 2013, 18:18
by harningt
I perform the following set of operations:

  • Setup duplicate data on 2 devices
  • Added a note to task A on device A
  • Marked task A complete on device B
  • Synced device B
  • Synced device A

Device A does not have the note that was added. One could argue that a task marked complete need not have notes, but I imagine that someone might collect these in a future processing step.

Re: Lost note data on "complete"

PostPosted: Sun 3. Feb 2013, 18:26
by harningt
Whoops, realized I hadn't posted in prescribed format:
Device model: Motorola Photon 4G and Bluestacks
Android version: 2.3.4 and (not certain)
DGT GTD Value Pack version:DGT GTD rc1-185, Value pack rc1-7

Re: Lost note data on "complete"

PostPosted: Sun 3. Feb 2013, 18:38
by harningt
Thinking this issue through further, supporting data sync could reasonably require a date / change number field on each individual item.

When I marked the task complete, it didn't record the fact that no change was made to the 'complete' status, but instead marked that the whole item itself changed.

Depending on how your algorithm works, perhaps for each item, a 'changelog' could be attached and grown until you sync, at which point the changelog would be committed to the server and the local copy would clear its record of the changelog... though perhaps keeping a changelog could be useful in merging changes.

In my simple example we have:
device A
task {
... current state,
changelog: [ {complete: true, complete-date: ..., change-date: ...} ]
}

device B
task {
... current state,
changelog: [ {notes: "New notes", change-date: ...} ]
}


Downside to relying on date is that you have to allow for quite a bit of sway between clocks (horrible, but reality). However... the date isn't so important for merging as you could determine that there is a conflict in the changelog and prompt the user perhaps... with a good amount of information since the changelog would have all the elements that changed.

Re: Lost note data on "complete"

PostPosted: Sun 3. Feb 2013, 19:23
by dgtale
I forgot to mention that the conflicts resolution rule is not yet changeable, currently it's set to "Most recent wins".
However I don't think I'll implement such a sophisticated solution to resolve conflicts.

The current idea is to have trivial rules like
- local device wins
- remote sync file wins
- most recent wins (which is actually applied in the current version)