QField icon indicating copy to clipboard operation
QField copied to clipboard

Relation from the table without geometry to the table with geometry doesn't create the geometry.

Open jhonalex06 opened this issue 1 year ago • 1 comments

Describe the issue

I created a project with a relation many to many between the table (CCA) Punto and the table (CCA) Predio, the pivot table between these tables is cca_predio_punto. When I try to create a new feature related to the table (CCA) Predio, QField doesn't allow me to create the geometry so the feature can't be saved.

Reproduction steps

Steps to reproduce the behavior:

  1. Open Project.
  2. Edit mode.
  3. Add new feature from (CCA) Predio
  4. Fill the mandatory attributes first tab.
  5. Chose the second tab cca_punto.
  6. Add new feature
  7. Notice doesn't allow to create the geometry.
  8. Fill the form.
  9. Confirm changes.

Project file for testing: basic.zip

Expected behavior

QField should allow the creation of a new geometry feature in many-to-many relations.

Observed behavior

QField doesn't allow creating a feature with geometry in a relation of many-to-many.

Screenshots and GIFs

result_reduced

error_geom

QGIS (please complete the following information)

  • OS: Ubuntu 22.04.4 LTS
  • QGIS Version 3.34.7
  • QFieldSync Version: No use QFieldSync

QField (please complete the following information)

  • Device: Samsung Galaxy S24 Ultra
  • OS: Android 14
  • QField version: 3.4.1 - Ebo (c28cef)

Additional information

  • Problem started happening recently, didn't happen in an older version of QField: Yes
  • Problem can be reliably reproduced, doesn't happen randomly: Yes
  • Problem happens with all files and projects, not only some files or projects: Yes

jhonalex06 avatar Sep 18 '24 02:09 jhonalex06

Hello @nirvn excuse me bugging you, I just would like to know if you have opportunity to check this issue and if you consider it is doable the fix?

Thank you

jhonalex06 avatar Sep 24 '24 02:09 jhonalex06

@jhonalex06 , thanks for the good issue reporting and the test project, it made is very easy to identify what was wrong here.

A fix has been found. If you could test the APKs that will show up in this PR (https://github.com/opengisch/QField/pull/5807) to confirm things now work as you expected to be, it'd be useful.

nirvn avatar Nov 12 '24 02:11 nirvn

@jhonalex06 , thanks for the good issue reporting and the test project, it made is very easy to identify what was wrong here.

A fix has been found. If you could test the APKs that will show up in this PR (#5807) to confirm things now work as you expected to be, it'd be useful.

@nirvn Amazing, I am glad the report and the test project help 👍🏾 , I am going to test the APKs, count on it.

jhonalex06 avatar Nov 19 '24 00:11 jhonalex06