Is there any filter for getting the defect if it has only one label. (A defect may have multiple labels in our case)

Kamal September 7, 2016
 

3 answers

0 votes
Pablo Beltran
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 7, 2016

SQL for JIRA does the job in a straightforward way.

Simply convert you JQL;

type=defect

into a SQL and filter by the amount of labels:

select i.key from issues i inner join issuelabels l on l.issueid = i.id where JQL = 'type=defect' group by i.key having count(*) = 1

then convert back the SQL into a JQL:

issue in sql("select i.key from issues i inner join issuelabels l on l.issueid = i.id where JQL = 'type=defect' group by i.key having count(*) = 1")



 

0 votes
Kamal September 7, 2016

Hi Steven,

Thanks for the reply.

So, if i have 50 labels. Then i need to give all those in the NOT . sad

0 votes
Steven F Behnke
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 7, 2016

No, not out of the box. The best you could do is something explicit – 

label = triage AND label not in (branch, computer, upset)

Suggest an answer

Log in or Sign up to answer