How do I make the second field of a cascading select field required?

If a cascading select field is set to required, only the first selection field is actually required. The second field can be left unselected. How do I make both fields required? I found this:

cfValues["myCascadingSelect"]?.getKeysAndValues()?.size() == 2

but have been unsuccessful in getting it to work as a validation on the create transition.
We are running JIRA v5.2.5

2 answers

1 accepted

0 votes
Daryl Chuah Atlassian Team Feb 05, 2013

Hi there

There is a similar question regarding on this posted before, perhaps you can refer on this as a general guideline and reference : https://answers.atlassian.com/questions/17148/workaround-solution-for-making-2nd-drop-down-required-in-multi-cascade-custom-field

Hope it helps :)

Cheers

cfValues['your cascading field']?.values()*.value.size() == 2
 
This one is working for me.

Hi Where do I have to write that code?

You need to install script runner plugin firstly, Then use Script Validator to add the code

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,965 views 12 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot