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

Display content wrong filter for relational value fields with multiple selection #615

Open
1 task done
arno974 opened this issue Dec 12, 2024 · 0 comments
Open
1 task done

Comments

@arno974
Copy link

arno974 commented Dec 12, 2024

What is the bug?

There is an error when copying the QGIS form configuration to automatically generate the tooltip content in Lizmap for fields of type "relational value" when the "multiple selection" option is enabled.

image

The filter parameter of the aggregate function automatically generated only considers a single selection [1] and not multiple selections [2]. As a result, the field with the multiple selection does not display any values in Lizmap web.

[1] Content automatically generated by Lizmap

aggregate(
		layer:='my_relational_layer',
		aggregate:='concatenate',
		expression:=to_string("field"),
		filter:="field" = attribute(@parent, 'parent_field')
	)

[2] Content that should be generated by Lizmap to take into account the multiple option value

aggregate(
			layer:='my_relational_layer',
			aggregate:='concatenate',
			expression:="description",
			concatenator:=', ',
			order_by:="description",
			filter:= array_contains(string_to_array(
				replace(
					regexp_replace(
						attribute(@parent, 'parent_field') , '[{"}]', ''
					),
					',', ' '
				),
				' '
			)
			,"field"
		)

Versions, safeguards, checks summary etc

Versions :

  • Lizmap Web Client : 3.8.4-pre.8065 - commit 02c2d8242 3liz/lizmap-web-client@02c2d8242
  • Lizmap plugin : 4.4.6
  • QGIS Desktop : 3.34.4
  • Lizmap.com : Yes
  • QGIS Server : 3.34.11
  • Py-QGIS-Server : 1.9.2
  • QGIS Server plugin atlasprint : 3.4.1
  • QGIS Server plugin cadastre : 1.20.0
  • QGIS Server plugin lizmap_server : 2.11.2
  • QGIS Server plugin wfsOutputExtension : 1.8.2
List of Lizmap Web Client modules :
* saas : 1.7.6 * cadastre : 2.1.4 * webdav : 1.2.0
List of safeguards :
* Mode : normal
* Allow parent folder : no
* Prevent other drive : yes
* Prevent PG service : yes
* Prevent PG Auth DB : yes
* Force PG user&pass : yes
* Prevent ECW : yes

Check Lizmap plugin

  • I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.
@arno974 arno974 changed the title Wrong automatic display formatting for relational value fields with multiple selection Display content wrong filter for relational value fields with multiple selection Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant