-
-
Notifications
You must be signed in to change notification settings - Fork 295
Description
What is the bug or the crash? What were your expectations and what actually happened?
We are working on a project that requires adding a trigger to a layer after creating the GeoPackage using the QFieldSync plugin. This trigger is intended to automatically update a field whenever a feature is split, by incrementing the value of a field called particion by +1 for all resulting features that share the same id_recinto value. Surprisingly, the same trigger runs correctly when using QGIS instead of QField.
While this functionality worked correctly in earlier versions of QField (e.g., 3.5), newer releases (such as 4.0.5) no longer preserve this behavior. As a result, the triggers do not execute as expected after splitting features.
Steps to reproduce the issue
bug_report.zip
trigger_gpkg.sql
These are the steps to reproduce the issue:
- Enable digitizing mode on the layer named "muestra".
- Open a feature form and activate the Split Features tool.
- Split the feature twice.
After splitting, you will notice that only the original feature receives the correct "particion" value (in this case, 1), while the newly created features have a NULL value.
Version
4.0.5
Operating system name
Android
Operating system version
13
Reinstall QField
- I have a fresh install of the latest QField version, but the problem persists.
- Problem can be reliably reproduced, doesn't happen randomly.
- Problem happens with all files and projects, not only some files or projects.
Additional context
No response