Bug report #10326

Reuse last entered attribute values ERROR

Added by Seb Radzimski about 10 years ago. Updated about 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Digitising
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:18749

Description

I think I found an error in QGIS 2.0/2.2 working with PostgreSQL 9.1/9.3 and Postgis 1.5/2.0 database on Windows (7 and 2008 server). During digitalization process I have a problem while using option ‘reusing last entered attribute values’. While adding a few objects with attributes (integer or real), if the last added object will have a NULL value in one of this attributes, all objects added before saving, will go to the database with NULL value of this attribute (even they have other values). But if the last object will have an attributes value <> NULL everything will be OK.
I found it happens only on integer or real types. On column text/char everything seems to be OK. If I switch off option ‘reuse last entered attribute values’ there is no problem.
How I said, it happens when QGIS works on with PostgreSQL. On SHP files I don’t have this error. Also on QGIS 1.7 (working on the same database) there is no problem.
Please check if you have the same error on yours computers. Maybe it is something wrong with mine, but I have checked this on 3 other machines and I still receive the same error.
Regards.

Associated revisions

Revision dc447472
Added by Jürgen Fischer about 10 years ago

editor widgets: restore initialization of null numeric values and dates in text edit widget (followup e605ad65; fixes #10326)

History

#1 Updated by Giovanni Manghi about 10 years ago

  • Subject changed from Reus last entered attribute values ERROR to Reuse last entered attribute values ERROR
  • OS version deleted (XP/7/2008)
  • Operating System deleted (Windows)
  • Target version set to Version 2.4
  • Priority changed from Normal to Severe/Regression
  • Category set to Vectors
  • Affected QGIS version changed from 2.2.0 to master

Confirmed on master, and as it worked in a previous qgis release tagging this as a regression.

#2 Updated by Jürgen Fischer about 10 years ago

  • Category changed from Vectors to Digitising

#3 Updated by Jürgen Fischer about 10 years ago

  • Status changed from Open to Feedback

Please verify if e605ad65 also fixes this.

#4 Updated by Giovanni Manghi about 10 years ago

Jürgen Fischer wrote:

Please verify if e605ad65 also fixes this.

the original issue seems fixed, but I see another bad one that I don't know if wasn't spotted before or if is a consequence of the fix:

when editing a postgis layer with a numeric field, if this can be NULL and it is left empty then is shows as NULL only before saving, because after saving this field become 0. This is regardless the option ‘reusing last entered attribute values’ is active.

When using the ‘reusing last entered attribute values’ the fields that in the previous digitizing operation were left empty (so before saving) are shown as 0.

#5 Updated by Giovanni Manghi about 10 years ago

Giovanni Manghi wrote:

Jürgen Fischer wrote:

Please verify if e605ad65 also fixes this.

the original issue seems fixed, but I see another bad one that I don't know if wasn't spotted before or if is a consequence of the fix:

when editing a postgis layer with a numeric field, if this can be NULL and it is left empty then is shows as NULL only before saving, because after saving this field become 0. This is regardless the option ‘reusing last entered attribute values’ is active.

When using the ‘reusing last entered attribute values’ the fields that in the previous digitizing operation were left empty (so before saving) are shown as 0.

ps does not seems to affect shapes, dodn't tested spatialite.

#6 Updated by Jürgen Fischer about 10 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF