30

I have a label set for some of my issues. When searching labels="ab" I get the relevant ones, but I cannot seem to find the right syntax for asking labels!="ab". How can I query for the ones not equal to ab?

Nakilon
  • 34,866
  • 14
  • 107
  • 142
Lihilu
  • 301
  • 1
  • 3
  • 4

2 Answers2

72

!= works for me although it only shows issues that have labels If I want to show all issues that do not have a certain label I have to do

(labels is EMPTY OR labels != 'mylabel')

This behaviour is currently intended by the Jira-Team. A suggestion to change it has been posted in the Developer-Jira and can be voted for.

Fabian
  • 318
  • 1
  • 10
Gertjan Assies
  • 1,890
  • 13
  • 23
10
labels != 'ab'

Will display all issues with labels that differ from 'ab', but not empty labels.

to show those with empty labels too:

labels != 'ab' OR labels is empty
Kuf
  • 17,318
  • 6
  • 67
  • 91
  • I get results for labels = ab, but when adding ! before the = I get 0 results. BTW - it does not give me an error, like the !~ gives, it just says 0 results. If I try labels = empty it gives me results, so for sure I have items with labels != ab – Lihilu Jul 10 '12 at 11:57
  • Not exactly, searching for 'labels != ab' will not output issues with labels that are empty. It will only list issues that have non empty labels and their labels does not include 'ab'. Please try what I've told you to do - click on an issue label and then change the '=' to '!=' and tell me what happens. – Kuf Jul 10 '12 at 12:31
  • 2
    The `OR labels is empty` was golden. Thanks! – grammar Mar 14 '14 at 14:19