Bug report #9320
Weird behavior when creating columns from a joined table
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Jürgen Fischer | ||
Category: | Vectors | ||
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 |
Description
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.
Associated revisions
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)
History
#1 Updated by Giovanni Manghi almost 11 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 11 years ago
Confirmed on Linux with QGIS master 48afac3
#3 Updated by Paolo Cavallini almost 11 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 11 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 11 years ago
- Status changed from Open to Closed
Fixed in changeset 9d7ef65a2dd4d5a4b07e37af01cff04146bca34e.