Forums

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

Search multiple options in a cascade type field

Jon
Contributor
July 29, 2019

I have a field that is a cascade type field. it has 5 main options and each of those has 1-3 additional options. i want to do a search based on 3 of the approximately 15 different options but it will only let me select "any" for the parent options. What i want to do is search across 3 of the different parent options. 

 

currently it looks like this with one of them selected 

project = ES AND issuetype = Epic AND status in ("OPEN Loaded", Open) AND "Pmt Term" in cascadeOption(10431, 10432)

 

and the other ones im trying to search at the same time have codes.

(10428, 10429)

(10425, 10426)

 

I tired to combine them but it said the below. 

 

SearchBasicSwitch search results viewIncorrect number of arguments specified for the function 'cascadeOption'. Usages: cascadeOption(parentOption), cascadeOption(parentOption, childOption), cascadeOption(parentOption, "None").

 

Are there any wild card characters i can use or does anyone else have an idea? 

2 answers

0 votes
Michael Clarke
Community Champion
November 22, 2022

I've got a similar one.
I'd like to have a dashboard gadget that reports only the Parent value, but not the Child value.

e.g. 
Cascading value field with the Parent options:
Animal, Plant, Mineral

Animal will have child options e.g. Mammal, Reptile, Amphibian
Plant will have child options e.g. Tree, Moss, Algae

Mineral will have child options e.g. Gold, Oxygen, Helium

I would like to report on the spread of issues across the Parent value only

e.g.
Animal 60% 

Plant 20%

Mineral 20%

 

What I'm getting instead is the full Parent + Child value
e.g.

Animal - Mammal 10%

Animal - Reptile 20%

Animal - Amphibian 30%

Plant - Tree 10%

Plant - Algae 10%

etc

 

Is there a way to limit the display of only the Parent value using JQL?

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 2, 2019

Hi Jon,

I think I can see the confusion over the usage of this JQL function here.  While the cascadeOption() function lets you pass multiple values, it's not like other JQL functions that use the IN operation where you can define multiple specific values in the same function.  Instead the multiple values that are accepted by that function are in regards to a single parent option and single child option per use of that specific function.

Hence you were probably formatting your failing query in a way such as

project = ES AND issuetype = Epic AND status in ("OPEN Loaded", Open) AND "Pmt Term" in cascadeOption(10431, 10432, 10428, 10429, 10425, 10426)

But instead I believe you will need to format it like this instead:

project = ES AND issuetype = Epic AND status in ("OPEN Loaded", Open) AND ("Pmt Term" in cascadeOption(10431, 10432) OR "Pmt Term" in cascadeOption(10428, 10429) OR "Pmt Term" in cascadeOption(10425, 10426))

The documentation on cascadeOption(), would seem to concur that you can only specific one parent and one child value per use.

I hope this helps.

Andy

Tim
Contributor
March 30, 2021

I have a similar question.  I'd like to find all Parent options that don't have a child option selected.  Something like

"Area/Feature[Select List (cascading)]" in (cascadeOption("*", none))

But the wildcard is not acceptable to JQL:

The option '*' specified in function 'cascadeOption' is not a valid parent option.

 

Any suggestions?

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events