Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many-to-many field behaviour inconsistent with QGIS #5180

Open
agseaton opened this issue Apr 11, 2024 · 3 comments
Open

Many-to-many field behaviour inconsistent with QGIS #5180

agseaton opened this issue Apr 11, 2024 · 3 comments

Comments

@agseaton
Copy link

Describe the issue

The behaviour in QField of many to many fields is not consistent with that in QGIS.

In the QGIS attribute form configuration, a many-to-many field can be configured to allow the user to add, delete, link, or unlink items in the target table.

Screenshot from 2024-04-11 16-00-08

However, the link and unlink options don't work in QField -- the field is blank and can't be edited.

Additionally, while the add and delete options work in QField, and they actually function as 'link' and 'unlink' do in QGIS, i.e. they don't actually allow creation and deletion of rows in the target table.

Reproduction steps

  1. Set up two tables and a join table
  2. Configure QGIS relations for a many-to-many relationship between the two tables
  3. Set up attribute form for the relation with either 'link' and 'unlink' selected, or 'add' and 'delete'.
  4. Export to QField
  5. Test form in QField.

Expected behavior

If link and unlink are selected:
Screenshot from 2024-04-11 16-00-08

Form should allow linking/unlinking an existing child feature, as shown in QGIS:
Screenshot from 2024-04-11 16-10-45

Screenshot from 2024-04-11 16-06-55

If add and delete are selected:
Screenshot from 2024-04-11 16-15-14

Form should allow adding new features/deleting existing ones from the child table, again demonstrated in QGIS:
Screenshot from 2024-04-11 16-12-44

Screenshot from 2024-04-11 16-13-59

Observed behavior

If link and unlink are selected:
QField widget doesn't do anything

Screenshot from 2024-04-11 16-15-52

If add and delete are selected:
QField widget is functional, but actually just allows linking and unlinking, not adding and deleting:

Screenshot from 2024-04-11 16-19-17

image

Screenshot from 2024-04-11 16-19-46

Note here also that QField displays the attributes form for the join table, whereas QGIS bypasses that entirely (which is the desired behaviour).

Sample project file & database

m2m.zip

Desktop (please complete the following information)

  • OS: Ubuntu 22.04.4 LTS
  • QGIS Version 3.34.5-Prizren
  • QFieldSync Version v4.9.1

Mobile (please complete the following information)

  • Device: Oneplus 11
  • OS: Android 14
  • QField version: 3.2.2 - Congo 72be17

Additional information

  • Problem started happening recently, didn't happen in an older version of QField: No
  • Problem can be reliably reproduced, doesn't happen randomly: Yes
  • Problem happens with all files and projects, not only some files or projects: Tested with GPKG and spatialite.
@nirvn
Copy link
Member

nirvn commented Jun 26, 2024

@agseaton , have you tried with the latest QField 3.3 version? A couple of bugs were fixed with relations with cardinal configuration.

@nirvn nirvn added the feedback label Jun 26, 2024
Copy link
Contributor

The QField project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale label Jul 11, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2024
@agseaton
Copy link
Author

Sorry for not getting back to you earlier on this.

I've tested it out with the example project provided above and QField 3.4, and I'm still seeing the issues I described.

@github-actions github-actions bot removed the stale label Sep 21, 2024
@nirvn nirvn reopened this Sep 21, 2024
@nirvn nirvn removed the feedback label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants