Bug report #14351

composer: legend item count for layers with @atlas_ variables always return 0

Added by Mathieu Pellerin - nIRV about 8 years ago. Updated about 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:22336

Description

Legend items of rule-based layers featuring an expression containing @atlas_{feature,featureid,pagename,etc.} variable(s) will result in a feature count of 0 in the composer legend item (will also return 0 for the main canvas' layer items when the atlas is activated). I'm wondering whether this has to do with the atlas variables context not added to layer nodes, thus coming to a feature count of 0.

I've attached a test project that shows this issue quite well.

Steps to reproduce
  1. Open the test project (atlas_count)
  2. Open the "Composer 1" composer sheet, and activate the atlas
  3. Move between features, and notice the composer item on the sheet shows [0] count even though the layer rule is valid and triggers several features (positive match visible through symbology)

I'm very pretty sure this is a regression, but have not confirmed it against QGIS 2.8 LTS

atlas_count.zip (9.18 KB) Mathieu Pellerin - nIRV, 2016-02-22 12:35 AM

History

#2 Updated by Nyall Dawson about 8 years ago

  • Priority changed from Severe/Regression to Normal
  • Assignee deleted (Nyall Dawson)

I've tested against 2.8. This isn't a regression.

#3 Updated by Mathieu Pellerin - nIRV about 8 years ago

  • Subject changed from regression: composer legend item count for layers with @atlas_ variables always return 0 to composer: legend item count for layers with @atlas_ variables always return 0

Thanks for testing Nyall, sorry for the noise on this being a regression.

#4 Updated by Giovanni Manghi almost 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#5 Updated by Giovanni Manghi about 5 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF