Bug report #7639

important data loss regression: data entered into newly created column(s) lost when saving changes

Added by Mathieu Pellerin - nIRV over 11 years ago. Updated over 11 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:-
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:16560

Description

Spotted a pretty big regression: if a user create a new column and input data into the newly created column without within one edit session (i.e. before clicking on save button), the data will disappear when saving layer changes. This is happening when editing shapefiles, possibly affects other formats.

Steps to reproduce:
1. Load the attached shapefile (data_loss.shp) into a new project
2. Open the layer's attribute table and activate the edit mode
3. Add an integer column via new column window
4. Add (random) values into the newly created column
5. Deactivate the edit mode and when your asked to save changes, click on the "save button"

At this stage, all of the values you've entered are gone, replaced by NULL.

This has the potential to lead to important data loss for quite a large number of users as the above steps are quite common. Flagging this issue as leading to data "corruption".

data_loss.zip (1.35 KB) Mathieu Pellerin - nIRV, 2013-04-18 12:08 AM

Associated revisions

Revision 0b780b0a
Added by Matthias Kuhn over 11 years ago

[Fix #7639] Don't compare TypeName when comparing fields

Revision 6d046fca
Added by Jürgen Fischer over 11 years ago

Merge pull request #539 from matthias-kuhn/fix-7639

[Fix #7639] Values for new attributes not saved (Blocker)

History

#1 Updated by Giovanni Manghi over 11 years ago

  • Status changed from Open to Feedback

likely the sane issue of #7378

#2 Updated by Matthias Kuhn over 11 years ago

I have a Pull request pending for this. I'd like it to be reviewed by someone familiar with dataproviders. Maybe there's a cleaner way to fix this.

https://github.com/qgis/Quantum-GIS/pull/539

#3 Updated by Matthias Kuhn over 11 years ago

  • Pull Request or Patch supplied changed from No to Yes
  • Status changed from Feedback to In Progress

#4 Updated by Jürgen Fischer over 11 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF