• Community
  • Products
  • Jira
  • Questions
  • Need a Behaviours Validation script. Copying 2 - "Select List(Single choice)" all options to another "Select List(Cascading) with first list options from 1st Select List & Second list options from 2nd Select List(Single choice) fields respectively

Need a Behaviours Validation script. Copying 2 - "Select List(Single choice)" all options to another "Select List(Cascading) with first list options from 1st Select List & Second list options from 2nd Select List(Single choice) fields respectively

Hi!
I need a Behaviours Plugin Validation script, which will copy first "Select List(Single choice)" custom field all options to another "Select List(Cascading) into 'first list' options and 'second list' options should take all options from second "Select List(Single choice)" custom field options.

Any class names, methods or even script examples are appreciated.
Thanks.

1 answer

What's the point of this? You will just end up with a long list of options for the cascading field that contains the Cartesian product of both single selects options.

Hi Jamie,

I Have 5 Select List(Cascading) custom fields are required for a user to give input on "how many(i,e 5 in number as of now) JIRA issues to be cloned" based on the selected mapping values.

But other 2 Select List(Single choice) custom field values[i,e one for Server component, and other one for Subsystem)will be chosen while creating a parent issue using the form/screen by selecting the specific Server component and Subsystem values - single JIRA issue only will be possible to create using the Create screen/form. 

I hope this clarifies my original requirement.

So I am need of copying 2 Select List(Single choice) custom field values into the 5 Select List(Cascading) custom fields as values of these fields are same in my project.

Means, whenever 2 Select List(Single choice) custom field values are added newly, script should able to copy/append same values into Select List(Cascading) custom fields in first list, second list options respectively ..

This is the closest example. The second part explains how to create an Option, which is what you need by the sounds of things: https://scriptrunner.adaptavist.com/latest/jira/recipes/behaviours/select-list-other.html

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,943 views 19 22
Read article

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