JQL Help

PhilSpo
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.
May 15, 2020

Okay so i have the following JQL:

(category = "Customer Projects" OR category = "Shared - Customer Project Workflow") AND labels = re-work

 

and it brings back the following results:

 

image.png

What i need to do now is add to the JQL so that it only brings back all those with a 'Re-work label' as Empty (None) as some of these are populated.

 

If i add AND "Re-work Label" is EMPTY onto the end of the JQL it brings back no results. I have tried different ways of adding that final part into the JQL with no luck.

 

Does anyone know the correct answer please?

 

Thanks

 

Phil

 

 

 

3 answers

1 accepted

3 votes
Answer accepted
Christian Czaia [Decadis AG]
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.
May 15, 2020

Seems like that's the correct JQL. Is Re-work Label a custom label field? Is that a new field and maybe you haven't reindexed after adding the field to Jira?

What if you turn around the bit to state  "Re-work Label" is NOT EMPTY? Do you get the expected results?

Cheers

PhilSpo
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.
May 15, 2020

Thank you Christian, Yes it was the lack of the Re-index that caused the problem.

School boy error on my part.

 

At least i know my JQL is fine :)

 

Thanks Again for your help.

 

Cheers

 

Phil

Like Ingo Mohr likes this
Ignacio Pulgar
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.
May 15, 2020

Hi @PhilSpo ,

As a side note, while this part of your query contains absolutely correct syntax:

(category = "Customer Projects" OR category = "Shared - Customer Project Workflow")

I'd recommend this alternative but shorter way to retrieve the same issues:

category in ("Customer Projects", "Shared - Customer Project Workflow")

Best regards

Like # people like this
1 vote
Ingo Mohr
Contributor
May 15, 2020

Hi Phil,

if you add

AND "Re-work Label" is EMPTY

, this probably returns an empty result because the entries all have a "Re-work Label" value - which is "None".

If you tell me what values "Re-work Label" can have and what type the field has (e.g. String, Enum, ...), I'll try to build you JQL query.

However, I am not sure I understand what you want to see exactly:

Do you want to see all issues (in one of the two categories AND label "re-work") that do have a "Re-work Label" value other than "None"?

 

Cheers

Ingo

PhilSpo
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.
May 15, 2020

All sorted now Ingo, but thank you for the kind offer.

 

Cheers

 

Phil

Like Ingo Mohr likes this
0 votes
Sanjana _Alacriz_
Contributor
May 15, 2020

Hi @PhilSpo 

 

Not sure if I understood your problem correctly. If you are trying to fetch all issues where there is no Re-work label, then you should be using below JQL

 

(category = "Customer Projects" OR category = "Shared - Customer Project Workflow") AND labels != re-work

 

--Sanjana

Suggest an answer

Log in or Sign up to answer