I have one custom field i,e "subsystem" (Select List (single choice)) defined in my project and has many values configured in it.
Due to new requirement, I created one more new custom field i,e "Impacted subsystems list" (Select List (Multiple choice)) and I would like to map values from the subsystem to this new custom field using script runner - please suggest how to do this mapping.
whenever I add new value to 'subsystem' field to be appear in 'Impacted subsystems list' field too for JIRA issue users selection.
I am using JIRA version 6.7.16 and Script runner version 22.214.171.124.
I'm not understanding the requirement here, it's one of two things. Do you mean:
You want to copy values on issues from the subsystem field into the impacted-subsystems field
You have a list of options set for subsystem, and you want to add all the current options there into the list of options for impacted-subsystems field (a one-off configuration action)
Ok, you'll need to write a one-off script to iterate over the options for the first field and add them to the second.
You'll need to get a FieldConfig for both fields, then use it on the first field to get the list of options. You can then use
optionManager.createOptions(fieldConfig, parentOptionId, sequence, [options] to add the whole list in one go.
Have a look through https://docs.atlassian.com/jira/server/index.html?com/atlassian/jira/issue/customfields/manager/OptionsManager.html for the starting point.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG