Bug report #9320

Weird behavior when creating columns from a joined table

Added by Guillaume Larocque almost 9 years ago. Updated almost 9 years ago.

Assignee:Jürgen Fischer
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17927


Steps to reproduce:

1- Join the layer named 'Joined_Table.csv' to the layer named 'BBS_Routes' using the shared routes column.
2- Enter edit mode in the attribute table and try to create a new column (Integer, width 10) simply copying values from column year1980. This gives a column containing only NULLs while it should give NULLs only in rows that contain NULLS in the year1980 column. If you update the column using 'update existing field', while keeping the same formula, the NULLs disappear. Now create a new column that copies values of column year1994. This works as expected.

I can confirm that this was working properly in pre 2.0 versions of QGIS. I have tried various combinations of column names, column sums, etc. and I can't explain what's going on. I have seen this behavior on Windows 7 and Ubuntu, and on various other machines.

Joined_Table_Bug_Report.zip - Package with example files. (6.67 KB) Guillaume Larocque, 2014-01-10 10:59 AM

Associated revisions

Revision 9d7ef65a
Added by Jürgen Fischer almost 9 years ago

vector layer: fix attributeAdded signal
don't assume new attributes are added at end, because in case of joins
they are added after the provider fields and before the joined fields.

field calculator: prepare expression again after attribute was added
(fixes #9320)


#1 Updated by Giovanni Manghi almost 9 years ago

  • Target version set to Future Release - High Priority
  • Category set to Vectors
  • Priority changed from Normal to Severe/Regression

tagging this as a regression at least until I will have time to test if is still an issue on QGIS master.

#2 Updated by Alexander Bruy almost 9 years ago

Confirmed on Linux with QGIS master 48afac3

#3 Updated by Paolo Cavallini almost 9 years ago

  • Subject changed from Weird behavior when creating columns from a joined table. to Weird behavior when creating columns from a joined table

#4 Updated by Jürgen Fischer almost 9 years ago

  • Assignee set to Jürgen Fischer
  • Target version changed from Future Release - High Priority to Version 2.2

#5 Updated by Jürgen Fischer almost 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF