Bug report #9184

Join attributes table fails to produce a correct attribute table if columns have same names

Added by Anita Graser over 10 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/Core
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:17813

Description

The "Join attributes table" in "Vector general tools" fails to produce a correct attribute table if there are columns with the same name in both layers. The values are inserted into the wrong columns.

I guess the tool should work with prefixes like the built-in join (in layer properties) does.

Tested with 2.0-20131120

History

#1 Updated by Anita Graser over 10 years ago

One part of the fix could be

outFields = vector.combineVectorFields(layer,layer2)

#2 Updated by Anita Graser over 10 years ago

not sure I did it right, but here's a pull request that fixes the issue for me https://github.com/qgis/QGIS/pull/1026

#3 Updated by Alexander Bruy about 10 years ago

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

Applied in master as bb1380ea30

#4 Updated by Giovanni Manghi almost 9 years ago

  • Category changed from 94 to Processing/Core

Also available in: Atom PDF