Forums

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

Validate a selection list type field (cascade) in the workflow

Pablo Albani
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!
January 14, 2024

I need to validate that when a ticket is closed it has the categories field loaded, when I do the validation in the workflow it only validates that the main value is complete and does not validate that some of the values of the lower level are completed. Thank you very much for your helpScreenshot_15.pngScreenshot_14.pngScreenshot_13.png

3 answers

0 votes
Jakub Szczygielski October 7, 2024



I just came here with the same problem, realizing I cannot do it out of the Jira's box, without the 3rd party.

However, 
I think I came up with a workaround. 
In theory:
If you create text field named let's say "omg I need a raise for avoiding 3rd party products and saving company's money", add the field to the project screens, bla bla bla, then.
Add automation which triggers when field value of you cascade field child changes, then as an action you copy the value of cascade field child into newly created field. 
Then you can set up your newly created field as validator, because it shares the value of your cascade field child.

I'm gonna test my theory rn

Jakub Szczygielski October 7, 2024

Theory confirmed. If you still need it, I could share how I've done it. 

0 votes
Sean Chua _Adaptavist_
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.
January 21, 2024

Hey @Pablo Albani , like what Trudy has mentioned, unfortunately it can't be done natively right now and the standard Automation validation checks the parent field - not the child field.

However, if you do have a 3rd party app/plugin like ScriptRunner - you can add workflow extensions . With the app/plugin, when you create a workflow validator, you can choose "ScriptRunner Script" .
Screenshot 2024-01-22 at 1.59.15 PM.png

The script (Jira Expression) you can use could be something like; you will need to change the XXXXX to your customfield ID.

issue.customfield_XXXXX != null && issue.customfield_XXXXX.child != null

 
Hope it helps.

0 votes
Trudy Claspill
Community Champion
January 21, 2024

Hello @Pablo Albani 

Welcome to the Atlassian community.

Based on my research it appears that is not possible with native Jira functionality, but is with certain third party apps.

Are you willing to consider adding a third party app to your instance?

Two that have been mentioned that would add the capability are Adaptavist Scriptrunner and Jira Workflow Management Extensions.

Suggest an answer

Log in or Sign up to answer