Bug report #12996

Regression - Wrong default values on feature attributes edit form

Added by Antoine EDENN almost 9 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Jürgen Fischer
Category:Data Provider/PostGIS
Affected QGIS version:master Regression?:No
Operating System:Win 7 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21074

Description

QGIS 2.9 have a problem with edit form default values when you load table from postgres. QGIS recognize correctly data definition in propriety widget but not in feature attributes edit form.

Steps to reproduce:
1) create table in postgres like this :
CREATE TABLE public.t_sdaer_entree_champ
(
id serial primary key,
the_geom geometry(Point,2154),
source_releve character varying(50) DEFAULT 'EDENN'::character varying,
ddate date DEFAULT now(),
duser character varying(255),
commentaire text,
source_donnee character varying(50) DEFAULT 'ortho IGN 2012'::character varying
)
2) load table in QGIS
3) edit table and add new feature
Problem:
Default box for fields are not correctly reported:
‘source_releve’ default value is not reported
‘ddate’ use ‘source_releve’ default value …
(see attached picture)

It's a regression because QGIS 2.8 is not affected.

Windows 7 64bit desktop
Postgres 9.4 on Windows 7

Feature_Attributes_Edit_Form.jpg - Wrong default values on feature attributes edit form (25.9 KB) Antoine EDENN, 2015-06-18 08:07 AM


Related issues

Duplicated by QGIS Application - Bug report #12995: Regression - Wrong default values on feature attributes e... Closed 2015-06-18

Associated revisions

Revision 61f39d6f
Added by Jürgen Fischer almost 9 years ago

postgres provider: fix indexing of default values (fixes #12996)

Revision b1dac74f
Added by Jürgen Fischer almost 9 years ago

postgres provider: fix indexing of default values (fixes #12996; folloup 61f39d6f)

Revision 86fe4d5a
Added by Jürgen Fischer almost 9 years ago

postgres provider: fix indexing of default values (fixes #12996; folloup 61f39d6f)

(cherry picked from commit b1dac74f2baa17eed89f6652e0d3c1653d8483e9)

History

#1 Updated by Jürgen Fischer almost 9 years ago

  • Assignee set to Jürgen Fischer
  • Category changed from Forms to Data Provider/PostGIS

#2 Updated by Jürgen Fischer almost 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF