QGIS
QGIS copied to clipboard
Features count shows zero for 'all other values' when doing categorized symbology and features values are NULL
What is the bug or the crash?
When I apply a categorized symbology to a vector layer and the features values contain NULLs the features count when activated, shows a value of 'zero' features instead of the number of those with value NULL . The attribute values are A,B,C,D and NULL, and the style looks like in figure, where the 'all other values' count is set to zero:
The same layer when applying a rule based style, inserting a rule for null values looks like :
Steps to reproduce the issue
Assign a categorized style to a vector layer for features that contain some NULL values, and then activate the 'show features count' for the layer.
Versions
QGIS version | 3.30.1-'s-Hertogenbosch | QGIS code revision | 447e8d717a |
---|---|---|---|
Qt version | 5.15.3 | ||
Python version | 3.10.6 | ||
GDAL/OGR version | 3.4.1 | ||
PROJ version | 8.2.1 | ||
EPSG Registry database version | v10.041 (2021-12-03) | ||
GEOS version | 3.10.2-CAPI-1.16.0 | ||
SQLite version | 3.37.2 | ||
PDAL version | 2.3.0 | ||
PostgreSQL client version | unknown | ||
SpatiaLite version | 5.0.1 | ||
QWT version | 6.1.4 | ||
QScintilla2 version | 2.11.6 | ||
OS version | Ubuntu 22.04.2 LTS | ||
Active Python plugins | |||
ProjectPackager | 0.7.1 | ||
latlontools | 3.6.9 | ||
GroupStats | 2.2.7 | ||
batchvectorlayersaver | 0.9 | ||
grassprovider | 2.12.99 | ||
processing | 2.12.99 | ||
db_manager | 0.1.20 |
Active Python plugins ProjectPackager 0.7.1 latlontools 3.6.9 GroupStats 2.2.7 batchvectorlayersaver 0.9 grassprovider 2.12.99 processing 2.12.99 db_manager 0.1.20
Supported QGIS version
- [X] I'm running a supported QGIS version according to the roadmap.
New profile
- [x] I tried with a new QGIS profile
Additional context
No response
I tested the issue with different dataproviders using QGIS 3.30.1 (Linux Mint 21.1) and managed to reproduce it with all tested dataproviders (scratch layer, postgis layer, geopackage). Integer fields work fine, so it seems to be a problem with a text field? I also noticed that counts do work correctly if the style is copied from layer to another. But reclassifying layer will set the count of "All other values" back to 0.
still an annoying bug. the feature count can also be updated by clicking into the 'all other values' field and save it.