Bug report #13027

Join by location does not work when layers have equivalent filed names

Added by Alexandre Neto over 4 years ago. Updated about 4 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Vectors
Affected QGIS version:master 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 #:21103

Description

Join by location, both in the ftools and processing, are not working as expect when the join and target layers have field names that only differ by case.

The joined fields won't be filled with values if a similar fieldname exists.

Looking into the code, it seems that ftools_utils.testForUniqueness(fieldList1, fieldList2) consider the field names different even if it only the case.

But QgsVectorFileWriter() will consider the field names equal and therefore, adds add an suffix to the joined fields. This means that the attribute fields from target layer wont match while writing the file.


Related issues

Related to QGIS Application - Bug report #13032: Save as... fails to populate fields if layer has similar ... Closed 2015-06-23

History

#1 Updated by Jürgen Fischer about 4 years ago

  • Status changed from Open to Closed
  • Category changed from 44 to Vectors

also fixed with 8e2b791

#2 Updated by Jürgen Fischer about 4 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF