How to perform a any value (excluding no value) search for the parent option of a cascading field?

Raj Vora May 22, 2020

How can I perform an any value (excluding no value) search for the parent option of a cascading field?

 

Objective: Easily identify issues which contain cascading fields that have specified a valid parent value but don't have anything specified for its child value (ie. no value)

 

Referencing here:

 

I see that you can perform a any value (or no value) search on the child option while specifying one value for the parent option:

location in cascadeOption( "USA" )

 

I am wanting to do the same thing for the parent (with a slight variation that being excluding no values for the parent option).  Expanding on the the example on the site:

 

parent values = USA, Canada, Mexico

Child values = Atlanta, Boston, Toronto, Calgary, Mexico City

location in cascadeOption(x,none)

where x = any valid parent value (excluding no value)

 

I understand I can use three different expressions (one for each parent value)

location in cascadeOption("USA",none)

location in cascadeOption("Canada",none)

location in cascadeOption("Mexico",none)

 

but I'm looking a way to simplify things into one expression.

 

1 answer

1 vote
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 1, 2020

Hi Raj,

I think I understand what you are trying to do here.  You want to be able to easily see which issues have valid parent and child values and eliminate the issues that only have a valid parent option.  However the way that cascadeOption function works in JQL won't let you just pick a wildcard value of sorts for all of the parent options in a cascade select field.  I don't think it is currently possible with just native Jira to do what you want here in a single statement (without a few ANDs at least).

Instead, I think I might have a way to find what you are looking for in a JQL statement, but admittedly it's a bit long.  You could try something like this:

location is not empty AND location not in cascadeOption("USA",none) AND location not in cascadeOption("Canada",none) AND location not in cascadeOption("Mexico",none)

Where location is the name of my customfield, and I have tried to setup the same kinds of options.  By using the 'is not empty' that should return all issues that have some value here, and we can then use the 'not in cascadeOption' for each location to eliminate Jira issues that do not have any second value.  The tedious part of this is that you need that for each parent option in order to get everything here and if your cascade select field has a lot of parent options, it becomes rather tedious quickly to write all that out in JQL.  But it does seem to work in my testing.

Let me know if this helps.

Andy

Olga Vasilenko June 16, 2021

Thank you!

Suggest an answer

Log in or Sign up to answer