Bug report #14235

Merge selected features tool corrupts data when columns are defined as "hidden"

Added by David Beni - arx iT almost 9 years ago. Updated almost 9 years ago.

Status:Closed
Priority:High
Assignee:Nyall Dawson
Category:Digitising
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:22232

Description

This bug concerns the "Merge selected features" tool from the "Advanced Digitizing Toolbar". A sample project is enclosed with the report to reproduce.

Steps :
  1. Open the enclosed project
  2. Zoom to the "BATIMENT" layer, there are 2 features overlapping
  3. Turn on editing on this layer
  4. Select the two features
  5. Select the "Merge selected features" tool from the "Advanced Digitizing Toolbar"
  6. Keep the default settings in the merge dialog
  7. Validate to launch the merge
    The features are deleted, no new features created
  8. Open the "BATIMENTS" layer properties, go to the "Fields" section
  9. For the "ImportId" field, set the editor widget to "Text editor", instead of "Hidden"
  10. Validate and close the properties
  11. Merge again the 2 features with the defaults settings
    The merge is now working

The problem seems to come from this hidden "ImportId" field, because if you make the test with the "OGC_FID" field, the merge works in all cases.

MergeBug.zip - Project to reproduce the bug (330 KB) David Beni - arx iT, 2016-02-05 02:42 AM

Associated revisions

Revision 1566e37a
Added by Nyall Dawson almost 9 years ago

Fix merge attribute dialog mangles field values when layer has hidden
fields (fix #14235)

History

#1 Updated by Giovanni Manghi almost 9 years ago

  • Subject changed from Merge selected features tool deletes features in certain case to Merge selected features tool corrupts data when columns are defined as "hidden"
  • OS version deleted (8.1)
  • Operating System deleted (Windows)
  • Priority changed from Normal to High
  • Crashes QGIS or corrupts data changed from No to Yes

Does not seems to happen just in special cases... any time you have an hidden column that is not the PK this operation will lead to this data corruption...

#2 Updated by Nyall Dawson almost 9 years ago

  • Assignee set to Nyall Dawson

#3 Updated by Nyall Dawson almost 9 years ago

  • Status changed from Open to In Progress

#4 Updated by Nyall Dawson almost 9 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF