Bug report #18641
Error in 'Copy and Move feature', and null coordinates generated
|Affected QGIS version:||3.0.0||Regression?:||Yes|
|Operating System:||Mac Os 10.12.6||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||26529|
Three observations (apparently related).
1. With a point layer from postgis, it is possible to copy a feature but not to use the new functionality : 'Copy and Move' because Null values are generated in attributes conflicting with non null constraints .
The same test with the same data saved and loaded as a geopackage layer fails as well with the message : "Errors: ERROR: 1 feature(s) not added. Provider errors: OGR error creating feature -3: failed to execute insert : UNIQUE constraint failed: layer_test.fid" .
2. Loading a point layer from a CSV or a spreadsheet ( with XY coordinates : in my sample some points have no XY (the fields are empty) and are not shown on the map (although they are in QGis 2.14 at the (0, 0) coordinates, which is wrong to me). Then trying to give them a geometry with the "Add Part" tool from the Advanced Digitizing Tools two points appear, one at the chosen location and the other at the (0, 0) coordinates. They seem to be a multipoint, because moving one of them moves the other one as well. Saving it/them generates an error as well.
3. Moreover when importing the same point layer (tested with ODS spreadsheet), those that have correct XY values and are correctly shown on the map, are duplicated at the positions (X, 0) .
I have the feeling that these errors are connected but I may be wrong.