Content by Label - NOR logic

adrianoatl February 18, 2018

Using the Content by Label macro, I'm trying to list pages that satisfy this logic: select all pages that:

    - don't have the label "blue"  => run alone: returns 5 pages

    - OR don't have the label "red"  => run alone: returns 5 pages

    - OR don't have the label "yellow"  => run alone: returns 4 pages

What I want is the logic to return the maximum amount of pages, i.e. in this case: 5 pages. But when I run this logic using this:

Screen Shot 2018-02-18 at 10.07.04 PM.jpg

I get 4 pages listed instead of five.

How do I work this out with the labels in the editor?

1 answer

1 accepted

1 vote
Answer accepted
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 28, 2018

Hi Adriano,

I just need some clarification here on what you're trying to make happen so I can best understand what you need.

I created 5 pages on my instance: 

  1. Red (with a label of red)
  2. Orange (with a label of orange)
  3. Yellow (with a label of yellow)
  4. Green (with a label of green)
  5. Blue (with a label of blue)

I type -red, so all pages that are NOT with label red, and I get as expected, all pages that are NOT red:

  1. Orange
  2. Yellow
  3. Green
  4. Blue

Same if I only use -blue, all pages that are not blue, and same with -yellow, all pages that are not yellow. I get 4 results each time.

Now, if I put in Label*-red -yellow -blue, then I get two results because these are all the pages that do not include red, yellow, OR blue:

  1. Green
  2. Orange

Same for if I make three filters, with one label each:

  • Label*: -red
  • Label: -yellow
  • Label: -blue

I still get only green and orange, because those pages do not include red AND yellow AND blue.

If I have misunderstood your setup in any way can you please let me know and what exactly you are expecting to happen? I want to understand where the fault is.

Thank you!

Shannon

adrianoatl March 1, 2018

Hi Shannon. Yes, this is working fine. I got to the same conclusion a few days ago, but didn't update this post. The problem was with the way I thought labels worked (esp. with AND and OR). Thanks for your help, Shannon.

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2018

You're welcome, Adriano!

Happy you were able to come to the same conclusion.

Take care and have a pleasant weekend,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events