Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 Jun 01, 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

Thank you!

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you