• 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

1 vote

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

145 views 1 17
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