Forums

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

JQL query to filter a Cascade type field?

Castro Anibal - S170657 September 29, 2023

JQL query to filter a Cascade type field?

The goal is to select any combination of parent & child

2 answers

1 accepted

4 votes
Answer accepted
Tim Kopperud
Community Champion
September 29, 2023

Hi @Castro Anibal - S170657 

You can use cascadeOption(parentOption[, childOption]) and/or use "=" or "IN" operators. It depends on your exact need. See these examples:

city IN cascadeOption(USA, "New York")

city IN cascadeOption(germany, Berlin)

city IN cascadeOption(USA)

city in ("New York", Berlin)

city = Berlin

 You can combine these, and add "NOT" in front of "IN" to exclude options. E.g.:

car IN cascadeOption(Ford, Red) OR (car = BMW AND car NOT IN (Blue, gray, silver))

This should fetch issues containing red Fords and all BMWs that are not blue, gray or silver. 

You can play around with the combinations to get exact issues wanted. 

 

TimK.

Castro Anibal - S170657 September 29, 2023

thanks @Tim Kopperud ! will also be possible to integrate this query as a quick filter in a Kanban Board?

So that you can choose in the filter one option of "parent" and one option of "child" .

It could be two quick filters, one for parent, and one for child (which actually should only show the possible options for the parent selection)

Tim Kopperud
Community Champion
September 29, 2023

Hi @Castro Anibal - S170657

Yes, but it can be many quick filters, which is not too user friendly, if there are many parents and child's in the cascading list. 

I'm not sure your exact need/outcome here. If you use this for actively working within a Kanban (doing "Kanban stuff"), quick filter can be a way to go. If it's for some kind of reporting (e.g., see how many of xyz), I would suggest another approach though. 

 

Edit:

Sorry, I misread your question. After seeing your comment here I understood better what you were asking. You wanted two quick filter dropdown list to select from cascading options. Sorry, I don’t think this is possible.

TimK.

Like Castro Anibal - S170657 likes this
Caio Covos April 10, 2024

Hi @Tim Kopperud 

Is it possible to create a JQL that displays tickets where only the value of the parent field is filled in?

Ex (parent is not empty and child is empty)

Thanks

Like André-Xavier BERGER likes this
Vishal Banshraj Gupta
Contributor
September 26, 2024

Hi @Caio Covos ,

 

Yes, It's possible 

Eg. We have Location Field with Country & Cities

I want to find issues where a custom field ("Location") has the value "IND" for the first tier and no value for the second tier:

location in cascadeOption( "IND" ,none)

 

Thanks

Like Yatish Madhav likes this
2 votes
Yatish Madhav
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.
April 24, 2025

Great stuff!!! Thanks for the post @Castro Anibal - S170657 and the answer @Tim Kopperud and @Vishal Banshraj Gupta - this is very useful!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events