• Community
  • Products
  • Jira Software
  • 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

Manjunatha K R February 2, 2017

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

1 vote
JamieA
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.
February 3, 2017

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.

Manjunatha K R February 3, 2017

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 ..

JamieA
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.
February 3, 2017

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