Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Searching for issues with a specific label

Sandy Greenberg
Contributor
September 12, 2018

I'm struggling with a JQL query that will bring back issues with a specific label, even if there are other labels on the issue.

"project in (UKSCR, COMPRG) AND issuetype = Bug AND labels in (BAT)" and

"project in (UKSCR, COMPRG) AND issuetype = Bug AND labels = BAT"

don't work because they both bring back issues with ONLY the label "BAT".  If the issue has "BAT" in addition to other labels it doesn't get returned.  

 

It would help if there was an "includes" operator but there isn't.  Any ideas?

2 answers

1 accepted

5 votes
Answer accepted
Sandy Greenberg
Contributor
September 12, 2018

Damn.  Never mind folks.  I forgot the number 1 rule of testing which is "don't believe what anyone tells you".  I was given a link to a specific JIRA issue and was told that it should be in my list but wasn't.  When I looked it had more than one label so I (incorrectly) assumed that that was the problem.  

No, the problem is that it was a "Story" and not a "Bug".  (headslap).  Stand down.  Soz.  

Grigory Salnikov
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.
September 12, 2018

It happens all the time :)

Like • 3 people like this
0 votes
Grigory Salnikov
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.
September 12, 2018

Hi!

It's strange because here the opposite behaviour is reported:

Filter issues that have only one specific label and no other labels

Grigory Salnikov
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.
September 12, 2018 edited

Update: I've reproduced the situation in my environment and can confirm that search by labels works as described in the article above. The JQL:

project = ADM AND labels in (test1)

returns all the issues with the label 'test1' no matter how many other labels are there.

Sandy Greenberg
Contributor
September 12, 2018

It may be strange but it's true.  I get 15 issues returned with the label "BAT" but not the three issues with "BAT" and "Delphi".  

Grigory Salnikov
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.
September 12, 2018

Are you sure you don't have two different labels which look alike? For example, one letter could be written in a different language or something. Please, make sure.

Sandy Greenberg
Contributor
September 12, 2018

Yeah, my bad.  See below.  

Grigory Salnikov
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.
September 12, 2018

It's above now and it's ok.

Kim Cavalier
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 23, 2022

Ineed to find issues with a specific label but must not have a specific other label

Suggest an answer

Log in or Sign up to answer