Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,370,157
Community Members
 
Community Events
168
Community Groups

Searching for issues with a specific label

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

3 votes
Answer accepted

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.  

It happens all the time :)

Like Samy Harford likes this
0 votes

Hi!

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

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

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.

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".  

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.

Yeah, my bad.  See below.  

It's above now and it's ok.

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