Bug report #20429

"Merge Selected Feature" with option "Take Attributes from selected feature" do not respect postgres-provider default values

Added by Jan Lippmann almost 2 years ago. Updated almost 2 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Digitising
Affected QGIS version:3.4.1 Regression?:No
Operating System:Win Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:28249

Description

Important: it happens when "evaluate default values on provider side" is activated in the project settings

1. if i click "Take Attributes from selected feature" the attribut of the id field (primary key) is skipped. the new id value is NULL instead the default value of the provider.

2. save the edits failed, because the not null constraint.

3. the bad thing: if i try "undo" after save the edits, i have lost my new merged feature and the 2 origin features were deleted.

same problem with actual master, 3.2 i'ved not tested.

there are no issue with QGIS 2.18

@
CREATE SEQUENCE merge_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE merge_id_seq
OWNER TO dbg_admin_10409;

GRANT ALL ON SEQUENCE merge_id_seq TO dbg_admin_10409;

CREATE TABLE merge
(
id serial NOT NULL,
kategorie character varying(255),
geom geometry(MultiPolygon,31467),
CONSTRAINT merge_pkey PRIMARY KEY (id)
)
WITH (
OIDS=FALSE
);
ALTER TABLE merge
OWNER TO dbg_admin_10409;
GRANT ALL ON TABLE merge TO dbg_admin_10409;@

feature_merge_2.gif (2.88 MB) Jan Lippmann, 2018-11-09 09:33 PM

History

#1 Updated by Jan Lippmann almost 2 years ago

  • Status changed from Open to Closed

in my case it's fixed with revision 32b7d7e5

#2 Updated by Giovanni Manghi almost 2 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF