QFieldSync logs when synchro not successful
Opened this issue · 2 comments
Hi!
I use QfieldSync to synchronise field data from several tablets with a Postgis database.
Overall, the synchronisation works well, but sometimes I noticed incomplete synchro (some entities are missing from the Postgis tables).
I realised that this was due to database uniques constraints that had not been respected, so it's normal that some entities couldn't be recorded in database.
However, QFieldSync does not return any error messages to the user.
Would it be possible to return the postgres logs when there are errors during synchronisation?
It would be great to have this enhancement.
In my case I accitentally recognized, that some point-features were SILENTLY NOT added to database during syncronizing-process via cable. (Primary reason for failing syncronisation was a invalid/double sequence-number of unique id (for what reason ???))
Missing warnings will reduce trust in data extremly. (With warning-messages some import-issues may be fixed manually afterwards - but without warning-message the data may be corrupted by loss of some features) ....
To add on this very crucial subject: We have several users that ended up creating duplicates in their database because of that. Indeed, they synced their QField project, realized some data were missing, and tried to sync back the project, sometimes several times. The sync of course fails on the same entities (not respecting constraints), but the first ones are added at every try, creating duplicates.
A warning would be really helpful.
Even better in my mind would be the ability to rollback the changes if the sync is not 100% or "try" the changes before actually apply them. Something like:
- Launch sync
- Try every sync
- If no problem, actually sync
- If problem, ask user if he wants to sync the OK values (and drop the unsuccessful ones), or stop the sync process
- Produce a log of the failed ones (or everything)
Also, some users will sync their project from QField, but use the same project back on their tablet and take new data in the field. Of course, when they try to sync back this project, the first datas that were synced once are still recognized as "new" data by the plugin, creating duplicates. I'm wondering it the plugin could repackage these datas to the QField project as part of the original package (restart the log) after a sync, so the same project could be used again and again without the need to repackage everytime? This is a clear limitation for the level of our users right now.