Closed ondrno closed 1 year ago
In principle yes, but this is hugely more complicated in general. If a user wants to merge two trees which have many differences and the user wants to pick for each object the sync direction, they should use the Import Merge Tool that was created exactly for this purpose. The sync addon is not for merging, only for 1:1 syncing.
The case you describe is a special case however: if one tree is completely empty, the tool could offer to copy the non-empty one, as deleting everything is probably never what the user wants.
Hi,
I've successfully filled a empty database using the sync tool. However, after making some edit online and sync and making new edit in gramps (linux). The new changes were recognized as deleted, similar to the case above. I would appreciate the option to select the sync direction to overcome deletion, as in my case I'm 100% sure no records were edited in the web.
Hope this helps to create the feature ;-). Not sure why the tool sees the changes as deleted, as they were created and not changed in the web.
Hi,
what you describe sounds like a bug, so let's try to find out want went wrong.
I understand the wish to configure the sync direction, but this is a Pandora's box that I do not want to open - this tool should be more like Dropbox, which is also not asking you about the sync direction, if you know what I mean.
Can you please describe exactly in which order you changed and synced?
Edit online Sync: what happened? ===> OK no issues, changes imported. Edit on desktop: which objects? The same ones or different ones? same and different Sync: what happened? see screenshot
Can I share a log? how?
This is the last record in the web database: so all flagged as deleted are new in the desktop version
The date flag of last records in the databases are: Desktop: 1677705002 web: 1677612510
so that seems correct and shows recent updates of the desktop data.
Ok, last piece of information needed, can you please check ~/.gramps/gramps51/plugins/webapisync.ini
and post the value of timestamp
in the credentials
section?
Some background: since currently there is no database history, "added" and "deleted" are based on timestamps:
T is determined in the following way:
The timestamp in the config file is set at the moment of time when a sync completes, either with a successful synchronization or after finding both databases are equal.
In your example, I0292-I0305 are shown as deleted remotely, which means that T is larger (later) than the last change timestamp of these objects on desktop. There are two possibilities here:
Time not in sync between the two machines if they are not both running NTP?
Ok, last piece of information needed, can you please check
~/.gramps/gramps51/plugins/webapisync.ini
and post the value oftimestamp
in thecredentials
section?
timestamp=1677702356.40323
Time not in sync between the two machines if they are not both running NTP?
both have the correct (same time) being in sync with NTP pools
So thats 1. March 2023 20:25:56 UTC for the last successful sync. Does that match? That would imply that I0292-I0305 have a last changed timestamp before that. Can you confirm? Can you share the change timestamps of I0292 and I0305?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
I0294 | 0 | -1 | -1 | 1677699125 |
---|---|---|---|---|
I0295 | 1 | -1 | -1 | 1677699404 |
I0296 | 0 | -1 | -1 | 1677699404 |
I0297 | 0 | -1 | 0 | 1677701085 |
I0298 | 0 | 1 | 0 | 1677701085 |
I0299 | 0 | -1 | 0 | 1677701085 |
I0300 | 0 | -1 | 0 | 1677701085 |
I0301 | 0 | -1 | 0 | 1677701085 |
I0302 | 0 | -1 | 0 | 1677701085 |
I0303 | 0 | -1 | 0 | 1677701085 |
I0304 | 0 | -1 | 0 | 1677701085 |
I0305 | 0 | 1 | 0 | 1677701085 |
1677699404 1677701085 1677701085 1677701085 1677701085 1677701085 1677701085 1677701085 1677701085 1677701085
Environment: grampsweb 0.17, websync plugin (as of 08.12.2022)
Maybe a bug, more probably a feature request.
Steps to reproduce: 1) start with an empty family tree in grampsweb 2) do the websync in gramps 3) in final confirmation the plugin will show:
Obviously, that is the currently implemented behaviour. However, it could also work the other way around, i.e. local changes (1140), remote changes (none)
Thus, it would be great if the sync direction could be defined. Local -> web, web -> local, web <-> local