Not showing unlabeled results when using query "labels != ..."

Ore Landau June 9, 2012

Hello.

In the Issue Navigator, when searching for "labels != whatever" the expected result would be a list of all issues that don't have the whatever label.

In practice though, when using a query like that, the unlabeled issues in my project ALWAYS get screened out. There is no way around this nor is this the logical behavior.

In other words, i cannot view unlabeled issues when searching for "all labels but one".

3 answers

1 accepted

3 votes
Answer accepted
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 9, 2012

You need to use "IS EMPTY" or "IS NULL"

labels != whatever or labels IS EMPTY

Ore Landau June 9, 2012

Thank you very much.

Don't you think this should be the default behavior?

Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 9, 2012

No, because I have a database background. There is a difference between a field having no value verses a field having a value. The != or = will search a field that has a value assigned to it.

I can understand where you are coming from though. Please read about NULL values in any SQL style database if you want to understand more fully.

Bob Lane July 30, 2013

I used the technique '(labels not in("OnHold") or labels is EMPTY)' when 'labels not in("OnHold")' didn't work. It was not clear from the advanced search documentation that this was necessary. Maybe some one could point out where this is said or the documentation shodul be updated.

Emiliano Qaqi February 28, 2019

Could I use the same technique to find empty descriptions in multiple issues?
`description != IS EMPTY`

0 votes
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 31, 2013

I will not disagree that all documentation can be improved. The advanced search section is written more like a reference manual verses a tutorial. When you read a reference style text you can just read the section you need, but to get a full understanding you need to read the whole thing.

A tutorial cannot cover everything because it needs to be quick and easy to read.

So if you read the EMPTY/NULL keywords and read about the OR operator I think the information is there and made clear by the duedate example.

Maybe we should add a gotcha section for things that people discover. We can start by adding to comment section of the advanced search page.

Bob Lane July 31, 2013

I can see how the example that you refer to might lead me to try that technique; however, my search through the documentation didn't take me that way. I was trying things like 'labels != test' and 'lables NOT IN (test)' and nothing was being returned since the records had null label fields so I went to the 'Operators Reference' section looking for exceptions. A suggestion might be to add an explanation at the beginning of the 'Operators Reference' section that describes the behavior of attibutes with null entries.

No biggie and thanx for the help.

0 votes
Ore Landau June 9, 2012

Thank you very much.

Don't you think this should be the default behavior?

Suggest an answer

Log in or Sign up to answer