Bug report #10151
expression-based label regression, wrongly displaying NULL instead of nothing
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Jürgen Fischer | ||
Category: | Expressions | ||
Affected QGIS version: | 2.2.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 18608 |
Description
In the recent weeks, a regression has made its way to QGIS master resulting in expression-based labels labelling features with NULL when it should simply not show any label. It's a pretty significant issue.
For example, if your opening an OpenStreetMap roads dataset and only want to show labels for primary roads, the following expression was working just fine under QGIS 2.2: CASE WHEN ("highway" = 'primary') THEN "name" END
Under QGIS 2.3, applying the above expression will have all of the non-primary roads labelled NULL.
See attached project.
Related issues
Associated revisions
History
#1 Updated by Nathan Woodrow over 10 years ago
- Assignee changed from Nathan Woodrow to Jürgen Fischer
Yes this was changed by Jurgen but I do agree it's the wrong behavior. NULL should only be shown in attribute table, and controls like that.
#2 Updated by Mathieu Pellerin - nIRV over 10 years ago
It's definitively not desirable for labels to show NULL in a negative conditional expression; beyond the fact that the needed behavior is for no labels to show, it's also misleading the users into thinking the column's value is NULL (i.e. a positive conditional expression who's resulting field is NULL).
#3 Updated by Jürgen Fischer over 10 years ago
- Status changed from Open to Closed
Fixed in changeset 3d916633532b8bda2641eff76d6db55426ed1278.