Skip to content

@lizmap_user and @lizmap_user_groups not applied when editing existing features #5995

@arno974

Description

@arno974

In Lizmap, the variables @lizmap_user and @lizmap_user_groups are correctly applied when creating new features. However, when editing an existing feature, these variables are not evaluated or updated.

Problem:

  • Editing an existing feature does not populate or update fields using @lizmap_user and @lizmap_user_groups.

Expected behavior:

  • When a user edits an existing feature, Lizmap should evaluate @lizmap_user and @lizmap_user_groups in the same way as for feature creation.

Steps to reproduce the issue

  1. In the attribute fomr in QGIS set a field with a default value as @lizmap_user and check the constraint option
  2. In Lizmap, click on an existing feature and click on edit
  3. The form does not add the default value (but the same configuration with a new feature instead of editing an existing one works)

Versions, safeguards, check summary etc

Versions :

  • Lizmap Web Client : 3.8.12 - commit e3e0517 e3e05176b
  • Lizmap plugin : 4.5.3
  • QGIS Desktop : 3.34.4
  • Lizmap.com : Yes
  • QGIS Server : 3.40.7
  • Py-QGIS-Server : 1.9.6
  • QGIS Server plugin atlasprint : 3.4.3
  • QGIS Server plugin cadastre : 2.1.1
  • QGIS Server plugin lizmap_server : 2.13.1
  • QGIS Server plugin wfsOutputExtension : 1.8.3
List of Lizmap Web Client modules :
* webdav : 1.2.1 * saas : 1.7.7
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.

Operating system

Ubuntu

Browsers

Firefox

Browsers version

141.0

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions