Bug report #20673

QGIS3.4 Organize columns, data integrity compromised

Added by Soares SOares almost 2 years ago. Updated over 1 year ago.

Status:Closed
Priority:High
Assignee:Julien Cabieces
Category:Attribute table
Affected QGIS version:3.5(master) Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:Yes Copied to github as #:28493

Description

When you use 'Organize columns' and 'move selection to top' in atribute table you can crash your data integrity.

To reproduce this bug you will need a layer with more than 14 columns and more than
45 rows. That is the specification of our smaler table. We have tried with
a smaller table and we don't get any error.

1 - pick up the atribute table (postgres with geometry or shapefile),
right click in a column name and select 'Organize columns...'
2 - Reorder the columns. Thinking in column position like a list, try a
sequence that bring to initial positions the end elements. In a example
14,12,5,1,2...
3 - Back to the table, start edition.
4 - Click at QGIS numerator of feature in table. this will turn editable the cell of
the column 14 (remind the example above),
5 - Chose in menu table 'move selection to top'
6 - look for the atribute's of column 14, it will apear in another column
of the same selected object.

sample_data.zip (72 KB) Soares SOares, 2018-12-03 01:20 PM


Related issues

Related to QGIS Application - Bug report #20733: Attribute table: Order of columns doesn't persist Closed 2018-12-05

Associated revisions

Revision fba4b25b
Added by Julien Cabieces almost 2 years ago

fixes #20673 : Correct mapFromSource method when reordering columns

Revision 868254d6
Added by Matthias Kuhn almost 2 years ago

Merge pull request #8725 from troopa81/fix_20673

Correct mapFromSource method when reordering columns. fixes #20673

Revision 71799094
Added by Julien Cabieces over 1 year ago

fixes #20673 : Correct mapFromSource method when reordering columns

Revision 6c1b5d25
Added by Luigi Pirelli over 1 year ago

Merge pull request #8794 from troopa81/release-3_4

fixes #20673 : Correct mapFromSource method when reordering columns

History

#1 Updated by Giovanni Manghi almost 2 years ago

  • Status changed from Open to Feedback

Does it happens on 2.18?

#2 Updated by Soares SOares almost 2 years ago

Yes, Giovanni. And also in 3.4LTR

#3 Updated by Giovanni Manghi almost 2 years ago

Soares SOares wrote:

Yes, Giovanni. And also in 3.4LTR

my question was about 2.18, not 3.4

#4 Updated by Soares SOares almost 2 years ago

Yes, it happens in 2.18.

#5 Updated by Giovanni Manghi almost 2 years ago

  • Priority changed from High to Normal
  • Crashes QGIS or corrupts data changed from Yes to No

Soares SOares wrote:

Yes, it happens in 2.18.

I assume that the raw data integrity is not compromised(?)

#6 Updated by Alessandro Pasotti almost 2 years ago

I cannot reproduce on current master, can you please add a sample project and sample data and a video that demonstrate the issue?

#7 Updated by Soares SOares almost 2 years ago

Ok, I will send to you on monday.

#8 Updated by Soares SOares almost 2 years ago

Hello Alessandro. At the moment I can't make a video, but there is a project with a shapefile.
The columns already have been organized, so after open the project:
- Open attribute table;
- Start edition;
- Select any feature (click on QGIS's numerator in table);
- Move selection to top.

The content atribute in selected cell (col_18) will be sended to 'col_11'

#9 Updated by Soares SOares almost 2 years ago

2.14 just fine

#10 Updated by Alessandro Pasotti almost 2 years ago

  • Affected QGIS version changed from 3.4.2 to 3.5(master)

Confirmed on master thanks for the demo data.

#11 Updated by Alessandro Pasotti almost 2 years ago

  • Related to Bug report #20733: Attribute table: Order of columns doesn't persist added

#12 Updated by Giovanni Manghi almost 2 years ago

  • Status changed from Feedback to Open

#13 Updated by Luigi Pirelli almost 2 years ago

is it confirmed data loss or compromising? if so, the issue shouldn't have normal priority

#14 Updated by Giovanni Manghi almost 2 years ago

  • Priority changed from Normal to High
  • Crashes QGIS or corrupts data changed from No to Yes

#16 Updated by Luigi Pirelli almost 2 years ago

please Soares SOares give a double check to the proposed PR if it's possible. otherwise you have to wait merge and nightly build

Julien Cabieces wrote:

Proposed PR : https://github.com/qgis/QGIS/pull/8725

#17 Updated by Julien Cabieces almost 2 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

#18 Updated by Soares SOares over 1 year ago

  • Status changed from Closed to Reopened
  • Assignee set to Julien Cabieces

I've Tested 2.18.27 and the bug still there. The bug also persists in 3.4.3 I've used the same file in bug report.

#19 Updated by Julien Cabieces over 1 year ago

  • Status changed from Reopened to Closed
  • Resolution set to fixed/implemented

The correction had not been backported in 2.18.27 but is present in 3.4.4 (not 3.4.3)

Also available in: Atom PDF