How do I set a workflow condition on a cascading list without listing all possibilities?

Tony Uberuaga
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 13, 2019

Hello,  

I'm using Jira Cloud, and I've created a custom field with a cascading list.  When I do a filter, I get results based on the parent.  However, when I try the same thing as a workflow condition, it fails unless I list both parent and child list results.  

Example:  

Options for Parent:  A / B / C

Options for Child: 1, 2, 3 / 4, 5, 6 / 7, 8, 9

If filter for Parent A, all tasks with just Parent for A show up.  If I set the condition for a workflow transition to String compare Parent = A, it fails.  I seem to have to create A - 1, A - 2, A - 3, B - 4, B - 5, etc.  Is there a way to check for just the A or B or C? 

This list will grow over time, mainly the options for the Child.  I'd like a way to filter off the Parent, and not worry about the Child.

4 answers

0 votes
Maciej Dudziak _Forgappify_
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.
July 23, 2024

Hi @Anita Chen 

I don't know how to make it work in out-of-the-box conditions. But it is possible with Jira expression based validator. There are several options available on the Atlassian marketplace.

I am from Forgappify, and we developed Jira Expression Validator, which is part of the Workflow Building Blocks for Jira free app. The expression you need is similar to the following one:

issue.customfield_12345 != null && issue.customfield_12345.value == 'A'

Above will allow a transition if the parent option is equal to A. In order to check the child option you can use the following:

issue.customfield_12345.child.value == '1, 2, 3'

You need to change the ID of the custom field to a valid one. In the editor, after 'issue.', start typing the name of the field, and you will get suggestions with the correct value.

With Jira expression you can do all interesting stuff, like checking for inclusion or matching regex. E.g.:

['A', 'B'].includes(issue.customfield_12345?.value)

I am leaving a link to the app's documentation if you are interested.

I hope it will help.

Cheers

 

 

0 votes
Anita Chen
Contributor
July 22, 2024

I also have same issue. Does anyone know how to set this configuration?

0 votes
Ismoyo Eko Purwanto January 31, 2023

Please anyone who knows to set this configuration. I also have same issue. 

0 votes
Ivo de Vries January 16, 2023

I am having exactly the same issue. It has been some years but maybe someone has found a solution by now?

Suggest an answer

Log in or Sign up to answer