Bug report #13027
Join by location does not work when layers have equivalent filed names
|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|
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.