MerginMaps / MerginMaps/qgis-plugin

QGIS project should be refreshed when the conflicted project version is downloaded

Open
#557 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
44
Forks
20
Avg merge
3d 12h
Merged PRs (30d)
5

Description

What happens
In specific scenarios, QGIS uses old conflicted geopackage and not a new one. Therefore the user is not able to create new points in this layer. When a conflicted version of the project is downloaded from the mergin, geopackage is renamed to the conflicted one, and a new geopackage file is created. In this situation, when the user created a new point and hit the save button, the point is lost from the map canvas. The workaround is to close the project in QGIS and open it again.
The solution for this problem would be to refresh the project when a conflicted version of the project is downloaded.

How to reproduce

  1. create a project with a point layer and open it to both mergin web and QGIS
  2. add a point in QGIS, and hit save, but don't synchronize the project and close QGIS
  3. from mergin web, create new version of the project by uploading updated project files from the directory on the PC
  4. open QGIS and the project (don't synchronize yet), and add a new column in the layer
  5. now hit synchronize, you get a conflict error ➝ this is OK
  6. hit synchronize again and now the project should be synchronized between QGIS and mergin
  7. try to add a new point. You should see also a newly added column in the form.
  8. now hit the save button for the new point ➝ point disappear from the map (this is the problem)

Author of the original task:
Jozef Budac

Original tags:
migrate to github

Original task URL: https://app.clickup.com/t/861mt43y6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the conflict-download workflow in QGIS and trace the synchronization handling after the conflicted project and geopackage are downloaded. The fix is complete when the project uses the refreshed geopackage, the newly added column appears in the form, and a newly created point remains visible after saving.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.