Bug report #7639
important data loss regression: data entered into newly created column(s) lost when saving changes
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".
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.
#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
Fixed in changeset 6d046fcafafba27312daa09a3117e89d6a1c3e14.