Bug report #15931

Default value is not saved

Added by Andre Jesus almost 3 years ago. Updated over 2 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Edit widget
Affected QGIS version:master Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:23848

Description

Edit Widget Properties > Defaults: Default value

The option is not saved when you save the style to a database ( Save in database )

Save style to file works ok.

I'm using a MSSQL 2008 and a MSSQL 2016 databases

QGIS 2.18.1

Associated revisions

Revision 72cffa68
Added by Matthias Kuhn over 2 years ago

Save readOnly state and default values to style

They should be handled equal to the edit form config.
Fix #15931

Revision 0001856e
Added by Matthias Kuhn over 2 years ago

Save readOnly state, constraints and default values to style

They should be handled equal to the edit form config.
Fix #15931

History

#1 Updated by Andre Jesus almost 3 years ago

Save style to file works ok.

Correcting myself, saving styles to file doesn't keep the Default Values also.
It only keeps the values in the session you are using, if you close the application and open again the setting is cleaned.

It happens to all: Ints, Strings, Nulls, Expressions and Variables.

#2 Updated by Andrew McAninch almost 3 years ago

I can confirm that default values are not copied(with copy/paste style) or saved in .qml files with shapefile and spatialite layers in 2.18.2 as well.

#3 Updated by Andre Jesus almost 3 years ago

Confirmed the issue persists in version 2.18.2

The value for "Default value" is saved nowhere: clipboard, .qml, .sld, database or .qmldb

#4 Updated by Anonymous over 2 years ago

  • Status changed from Open to Closed

#5 Updated by Andre Jesus over 2 years ago

Anonymous wrote:

Fixed in changeset 72cffa68b9fd996620d076e1df5fbbdad92e4ecd.

Working perfectly, thank you!

#6 Updated by Giovanni Manghi over 2 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF