Bug report #20379

Attributes forms and problem with setting variables as defaults (QGIS 3.4.1)

Added by Jadwiga Trojak over 5 years ago. Updated over 5 years ago.

Status:Open
Priority:High
Assignee:-
Category:Forms
Affected QGIS version:3.4.1 Regression?:Yes
Operating System:Windows 7 Professional Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28199

Description

I have geopackage layer with two fields: user and data_mod. I'd like to set default value for user field with @user_account_name variable (widget type: Text Edit) and for data_mod field with function now() (widget type: Date/Time). In the first case, after clicking Apply button, this settings aren't save, and the default value changes automatically to 'NULL'. In the second case, default value changes automatically to exact date, not date from variable now().

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Feedback

Works as expected on 2.18 (I'm not sure @user_account_name is available on 2.18)?

#2 Updated by Jadwiga Trojak over 5 years ago

Yes, in QGIS 2.18.25 it works.

#3 Updated by Giovanni Manghi over 5 years ago

  • Regression? changed from No to Yes
  • Priority changed from Normal to High
  • Status changed from Feedback to Open

Also available in: Atom PDF