Bug report #981

Attribute Table sorting not working as expected

Added by Steven Mizuno about 16 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:Marco Hugentobler
Category:GUI
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11040

Description

Clicking on column headers does not sort properly unless

1. character type columns have no blanks, or

2. number type columns are strictly numeric digits and the negative sign (no scientific notation or NAN) Note that currently null values are shown as 0, at least on PostGIS data.

It usually takes several clicks on the header to show the problem.

History

#1 Updated by Magnus Homann over 15 years ago

It is the default Qt sorting, no idea how to change it.

#2 Updated by Jürgen Fischer over 15 years ago

does fix this?

#3 Updated by Steven Mizuno over 15 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Testing with

For number types, I have tried a mix of standard numeric notation and scientific notation and find that the sorting is correct, as long as there aren't the special values (like NaN, Infinity - note that infinity doesn't show in the attribute table view). Null cells sort at top or bottom depending on sort direction.

I believe that the special values are not very likely to be seen in the GIS world, so I won't pursue this any farther.

I can't be sure how text columns sort on null values (blank cells) as the word NULL is filled in for null data, so all cells have text in them. Therefore they sort properly.

Since numbers now sort properly, I consider this closed.

Thank you.

#4 Updated by Anonymous over 14 years ago

Milestone Version 1.0.1 deleted

Also available in: Atom PDF