Bug report #21497

Copying features from source layer to target layer - field values are not copied

Added by Thomas Nogatz over 5 years ago. Updated over 5 years ago.

Status:Closed
Priority:High
Assignee:Alessandro Pasotti
Category:Attribute table
Affected QGIS version:3.6.0 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:Yes Copied to github as #:29314

Description

Conditions:
- two shapefile layers, both have some equal attribute fields (same field name and data type)

Steps:
- select some features from source layer
- select source layer, copy (Strg+C)
- select target layer
- enable editing of target layer
- paste (Strg+V)
- open attribute table of target layer

Result:
The features are copied, but all fields of the copied features in the target layer are empty.

Affected versions:
This is an issue of QGIS 3 (3.4, 3.6) only. Former versions (2.14, 2.18) work properly, here field values are copied.

QGIS.zip (10.9 KB) Thomas Nogatz, 2019-03-06 12:34 PM

Associated revisions

Revision 0325a37f
Added by Alessandro Pasotti over 5 years ago

Fix makeFeatureCompatible wrong field count

Fixes #21497 - Copying features from source layer to target layer - field values are not copied

Revision d0824798
Added by Alessandro Pasotti over 5 years ago

Fix makeFeatureCompatible wrong field count

Fixes #21497 - Copying features from source layer to target layer - field values are not copied

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Feedback

Please attach sample data (same operation works here).

#2 Updated by Thomas Nogatz over 5 years ago

Please try to copy the features from "Pegel Glasowbach.shp" to "pp_483_alt.shp" - that works as described above here.

#3 Updated by Giovanni Manghi over 5 years ago

  • Regression? changed from No to Yes
  • Status changed from Feedback to Open
  • Priority changed from Normal to High
  • Operating System deleted (Windows 10)

yeah... confirming this on Linux.

#4 Updated by Alessandro Pasotti over 5 years ago

  • Assignee set to Alessandro Pasotti

#5 Updated by Alessandro Pasotti over 5 years ago

  • Status changed from Open to In Progress
  • Pull Request or Patch supplied changed from No to Yes
  • Crashes QGIS or corrupts data changed from No to Yes
  • Resolution set to fixed/implemented

#6 Updated by Alessandro Pasotti over 5 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

Also available in: Atom PDF