Bug report #18687

Duplicate features: attribute values with boolean data types are not duplicated correctly

Added by Andreas Neumann almost 5 years ago. Updated almost 5 years ago.

Affected QGIS version:3.1(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:26575


When "duplicating features with digitize", the attribute values of boolean values as "true" are not correctly duplicated and result in a value of "false".

Can be reproduced when duplicating a "Anlage" feature in the Kanton Zug Erdwärmesondenprojekt where the original feature has the values set to "true" in the group "Geologische Begleitung und Raport" (see red frame in attached screenshot).

qgis_duplicate_features_problem_boolean-values.png (104 KB) Andreas Neumann, 2018-04-10 02:28 PM


#1 Updated by Andreas Neumann almost 5 years ago

I tried to replicate with a smaller example - but failed.

Perhaps there is something special in our project configuration.

Do you think that the widget configuration has an influence on the duplicate process? We use a "Value map" as the widget for our boolean data to show "Ja/Nein" instead of "t" and "f".

#2 Updated by Andreas Neumann almost 5 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

Found out that this has nothing to do with "boolean" data types, but rather the fact that these attributes had default values assigned. Rather than copying the values from the existing partent feature, QGIS generated a new default value. This maske sense for some attribute fields, but not for all.

This issue will be closed, but most likely we will add a new feature request adding a third type of default value:

  • normal default
  • default also on updates
  • default also for duplicated features

Also available in: Atom PDF