QField
QField copied to clipboard
QFieldSync updates timestamps every time it syncs
I want to put a timestamp on records collected or modified in QField. I do this by setting an expression now() and checking 'apply default value'
this gives the desired result if I copy the project from my device and open it in QGIS. However, if I use QFieldSync, the it behaves as though the sync is an 'update' and the timestamps are updated accordingly. I can understand that the sync is effectively updating the original data but this result is undesirable for me
Reproduction Steps:
- Create a geopackage or shapefile dataset with a 'timestamp' field
- In Attribute form settings, uncheck 'editable', set expression now() check 'apply default value'
- Sync to QField configuring the dataset for offline editing
- Open project on device and modify records or create new ones
- Copy project from device--> open in a new instance of QGIS--> open attribute table or export dataset to csv
- In a different instance of QGIS, sync the above project to QGIS-->open attribute table or export dataset to csv to observe differences in timestamps
Expected behavior:
QFieldSync leaves timestamps as they are
Observed behavior:
QFieldSync treats a sync is an 'update' and the timestamps are updated accordingly
Screenshots and GIFs
Note the difference in timestamps from 'raw'
and synced data on the same project
.ods output of another similar project which was synced. Note the times
QField version: QField 1.9.6 QGIS 3.16.12-Hannover on Debian GNU/Linux 10 (buster) QField Sync 3.4.4
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: [Yes]