qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.67k stars 3.02k forks source link

Value-relations (multi-select) are displaying multiple occurrences of the same values #58209

Open Ipickedausername opened 4 months ago

Ipickedausername commented 4 months ago

What is the bug or the crash?

Hello,

Value-relation lists are displaying multiple occurrences of the same values when there are duplicate values in the relation table, even with the filters applied.

Steps to reproduce the issue

I'm working with multi-select value relations (field "alim"), where the lists are populated from the field "spec" and filtered using the field "id_poly" from the table LISTE_ESPECES_PO. In LISTE_ESPECES_PO, the spec field can contain multiple identical values, but for the same values, the id_poly is always unique (it can be the same if "spec" is different).

Here is the filter I'm using: id_poly = current_value('ID_REL') AND compart = current_value('compart') AND compart <> 'Flore'

settings_val_rel (2)

Here is a picture of how it looks like on the LISTE_ESPECES_PO table. liste_esp suite_liste_papa

If I’m not mistaken, I believe there is a bug in how the values are displayed in the attribute table. The list is properly displayed, and we can select the values we want: visuel_ok

However, once finished, the list looks like this: result_pas_ok

Instead of showing only one occurrence of each value from LISTE_ESPECES_PO as it is done in editing mode, every instance of the selected values is displayed after saving.

Versions

Version de QGIS 3.36.1-Maidenhead Révision du code 3e589453
Version de Qt 5.15.3
Version de Python 3.9.18
Version de GDAL/OGR 3.8.4
Version de Proj 9.3.1
Version de la base de données du registre EPSG v10.098 (2023-11-24)
Version de GEOS 3.12.1-CAPI-1.18.1
Version de SQLite 3.41.1
Version de PDAL 2.6.0
Version du client PostgreSQL 16.2
Version de SpatiaLite 5.1.0
Version de QWT 6.1.6
Version de QScintilla2 2.13.4
Version de l'OS Windows 10 Version 2009
       

Extensions Python actives GeoCoding | 2.19 GroupStats | 2.2.7 mapswipetool_plugin | 1.3 networks | 2.7.19 OpenTopography-DEM-Downloader | 2.0 qfieldsync | v4.9.1 Qgis2threejs | 2.7.3 quick_map_services | 0.19.34 SemiAutomaticClassificationPlugin | 8.2.2 Submission | 0.10 db_manager | 0.1.20 MetaSearch | 0.3.6 processing | 2.12.99

Version de QGIS 3.36.1-Maidenhead Révision du code 3e589453 Version de Qt 5.15.3 Version de Python 3.9.18 Version de GDAL/OGR 3.8.4 Version de Proj 9.3.1 Version de la base de données du registre EPSG v10.098 (2023-11-24) Version de GEOS 3.12.1-CAPI-1.18.1 Version de SQLite 3.41.1 Version de PDAL 2.6.0 Version du client PostgreSQL 16.2 Version de SpatiaLite 5.1.0 Version de QWT 6.1.6 Version de QScintilla2 2.13.4 Version de l'OS Windows 10 Version 2009

Extensions Python actives GeoCoding 2.19 GroupStats 2.2.7 mapswipetool_plugin 1.3 networks 2.7.19 OpenTopography-DEM-Downloader 2.0 qfieldsync v4.9.1 Qgis2threejs 2.7.3 quick_map_services 0.19.34 SemiAutomaticClassificationPlugin 8.2.2 Submission 0.10 db_manager 0.1.20 MetaSearch 0.3.6 processing 2.12.99

Supported QGIS version

New profile

Additional context

No response

nirvn commented 2 months ago

@Ipickedausername , I've not been able to reproduce this locally, could you provide a sample project that allows us to replicate this issue? Thanks.

Ipickedausername commented 2 months ago

Good morning !

Here is a link to download a test project : https://fromsmash.com/Test-multiselect-qgis

If you open the attribute table of the Layer1, there is 1 feature where you can see in the "choix_deno" column, that 'Name1' is repeated as many times as it is mentioned in the Layer2 Capture1

But when you add a new feature, the filter is properly applied. You can see that 'Name1' is only mentioned once. Capture2

github-actions[bot] commented 2 months ago

The QGIS 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.

Ipickedausername commented 2 months ago

Hi,

I shared a test project in my second message. It hasn't been downloaded yet.

github-actions[bot] commented 1 month ago

The QGIS 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.

Ipickedausername commented 1 month ago

Hi,

This is not a critical issue, as it does not alter the content of the fields. However, it does resemble an issue since the same information is displayed multiple times, sometimes showing dozens of repetitions. The field can become quite cluttered, making it difficult to identify the content effectively.

Here is how it can look like in real situation :

Capture

This appears to be more of a visual error or an issue with the filter not being applied to the field when visualizing on the attribute table.

Here is a link that shows this issue : https://fromsmash.com/test-project-qgis-errvis See attribute table of Layer 1, field choix_deno.

github-actions[bot] commented 1 month ago

The QGIS 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[bot] commented 1 week ago

The QGIS 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.