Bug report #20874

Field filter in the attribute table not working for numbers as the value gets enclosed as a string

Added by Tudor Bărăscu over 1 year ago. Updated over 1 year ago.

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

Description

I just noticed this, having a table with a id integer column.
If I do a field filter on the attribute table and enter 1 QGIS does an id = '1' instead of id = 1 so the result is not good.
This can be seen when switching to the advanced filter.

problem.gif (1.34 MB) Tudor Bărăscu, 2018-12-24 08:28 AM

History

#1 Updated by Tudor Bărăscu over 1 year ago

Actually the problem was how QGIS works. Meaning.. as I had a layer with 1 million features I was opening it with CTRL+F6.. (open attribute table with only the features that are in the map extent)..

From there on, the filter only filters the features that are in the attribute table.
You have to press apply to filter everything.

In the following GIF, I'm opening an attribute table with 360k features with the "Show features visible on Map" for performance reasons.
When adding a filter (I did an advanced filter) you can see the popup that shows that ALL the attribute table features are loaded and this strongly suggests that the filter is done on ALL of them.

However, it filters only the features already in the attribute table and you have to click Apply to filter on ALL.

I think it's against what a user would expect.
I tested this and it's the same if you start from the selected features.
The workflow should be improved IMHO.
Thoughts?

Also available in: Atom PDF