Closed jozef-budac closed 5 months ago
A similar problem appeared when I updated the project from previous steps when I tried to to the conflict file.
1) in mobile app: update a field in a specific feature and synchronize 2) in plugin: update the same filed in the same feature and hit synchronize
Again, with the geopackage, also the project file is updated.
...from discussion with Tomas:
Things "editor" is not allowed:
add/update/delete .qgs/.qgz project file
add/update/delete mergin-config.json
gpkg not updated through diff
gpkg deleted
try sync -> client detects problems (in project status dialog)
on (1) - just ignore the change (optionally allow revert of the change)
on (2),(3),(4) - within validations, show warnings that sync will fail + offer a button to revert those changes (not all, just ones violating (2),(3),(4)
CLIENT
PULL: if editor, and there is .qgs/.qgz file modified both locally and remotely, overwrite local copy using the remote one (instead of creating a conflicting copy)
PUSH: if editor, do not try to push .qgs/.qgz file
PLUGIN
project status dialog: add validations to check for (1),(2),(3),(4) + auto-fix to revert each
all these validations should be errors, only update of .qgs/.qgz project file is just a warning
autofix (1), (2): on add -> delete. on update/delete -> download from server
autofix (3), (4): copy basefile over the local copy (+ reload qgis project)
[optional] project status dialog: revert locally modified .qgs/.qgz file
12/6/'24 -> awaits review and testing, first internal, then from the testing team
Hi @MarcelGeo and @wonder-sk, I was playing around with the editor permission in the plugin and found some interesting behavior. I thought that we wanted to ignore changes only on QGIS project files during sync. However, I am experiencing that we ignore all files with unsupported editor changes (removal of .gpkg, non-diff based update,...). Is this intended? It does not reflect the originally specified behavior. Was there an update to the logic?
Example: I deleted a GeoPackage from the disk and also removed it from the layers list in the layers browser. When I hit sync, I see status information that the GeoPackage was removed and also that the QGIS file was updated (correct ✔). However, when I hit sync again, the sync process finishes without any issue (no 403 unauthorized sync error ⛔️). When I check the history of the project, I can see that no version was created as there were no files for the sync (both changes were skipped).
Is this intended? I find it quite user-unfriendly to be ignoring all changes.
Hi @MarcelGeo and @wonder-sk, I was playing around with the editor permission in the plugin and found some interesting behavior. I thought that we wanted to ignore changes only on QGIS project files during sync. However, I am experiencing that we ignore all files with unsupported editor changes (removal of .gpkg, non-diff based update,...). Is this intended? It does not reflect the originally specified behavior. Was there an update to the logic?
Example: I deleted a GeoPackage from the disk and also removed it from the layers list in the layers browser. When I hit sync, I see status information that the GeoPackage was removed and also that the QGIS file was updated (correct ✔). However, when I hit sync again, the sync process finishes without any issue (no 403 unauthorized sync error ⛔️). When I check the history of the project, I can see that no version was created as there were no files for the sync (both changes were skipped).
Is this intended? I find it quite user-unfriendly to be ignoring all changes.
As agreed on a call:
There is one problem with the editor role in the plugin. The Editor should be able to create and edit features in the project. The QGIS sometimes updates the project during feature editing, probably in case, the project is from an older QGIS version or some similar problem. It happens when I open the attribute table of the layer.
For example, when you open the attribute table of the Survey layer from project https://app.dev.merginmaps.com/projects/tme1/client/tree on QGIS 3.34.6, it changes the project file.
The editor should not be able to change the project file, so the result is, that the Editor can't modify a feature. In the zip files, you can see, what changes are made in the project file.
files.zip
This should be addressed for the Editor role to work well.