mobile
mobile copied to clipboard
Incorrectly configured date/time field blocks saving of form
I have a project with some constraints. I fill the form to satisfy the constraints but still the app does not allow me to save the feature: https://app.merginmaps.com/projects/saber/null_issue
A quick analysis of the problem:
- the offending field is
last_modifiedinwcc_weed_controllayer - the field config is not correctly configured, as even QGIS just sets NULL to
last_modifiedinstead of using correct date/time when adding a new feature. I think the default value should be justnow()instead offormat_date(now(), 'dd-MM-yyyy hh:mm:ss') - there is an error in Input - the logic for evaluation of constraints is apparently wrong, because there's no constraint, yet it does not allow adding the feature -- we should fix that (it is due to
QgsField::convertCompatible()not accepting the passed value)
It is also not very clear how to configure date/time stuff correctly - it https://merginmaps.com/docs/layer/settingup_forms/#date-and-time - we should somehow make it easier to understand (with some examples of correct use)