Bug report #21201

[Attribute table] Range widget arrow value is set to -2 147 483 645

Added by Harrissou Santanna 10 months ago. Updated 10 months ago.

Status:Open
Priority:High
Assignee:-
Category:Attribute table
Affected QGIS version:3.5(master) Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:29019

Description

Trying to change value of a postgres integer field in attribute table, I clicked on the up arrow, expecting to get 0 (from null) and it returns -2 147 483 645
Clicking the up or down arrow to change the value has no effect.
The only workaround is to manually type in a value (let's say 0) and then you can change the value using the arrows.

Hugo, just pinging you as I notice you made some recent changes to this widget

History

#1 Updated by Giovanni Manghi 10 months ago

  • Priority changed from Normal to High

#2 Updated by Hugo Mercier 10 months ago

Trying to change value of a postgres integer field in attribute table, I clicked on the up arrow, expecting to get 0 (from null) and it returns -2 147 483 645

Yes it returns the minimum value ... the 'null' value must be an actual value. If you expect 0, you expect null to be -1 ? Is it better than -2 147 483 648

Clicking the up or down arrow to change the value has no effect.

I can't reproduce on master ...

#3 Updated by Alexander Bruy 10 months ago

  • Status changed from Open to Feedback

#4 Updated by Harrissou Santanna 10 months ago

If you expect 0, you expect null to be -1 ? Is it better than -2 147 483 648

Good point. actually I haven't thought so far. But I'm pretty sure that nobody will be in need for -2 147 483 648 when hitting the arrow. People will most of the times go from 0 up or down.

I can't reproduce on master ...

Me neither. Actually I can reproduce none of the two issues I describe, using either 0d178aa or dabd649. Hitting the up arrow brings me to 0 and I can't get -1 (so no luck for -2 147 483 648 :D) when hitting the down arrow: values are set positive by default. I am still using the same PG layers as in the initial report with no changes made to fields meanwhile. Were your changes reverted?

#5 Updated by Giovanni Manghi 10 months ago

  • Status changed from Feedback to Open

Also available in: Atom PDF