edit select list options using groovy

I have a select list with options a b c d e

I need to rename option a with A using groovy.

What method i can use from API to perform a similar task.

Thanks,

Sumit

2 answers

1 accepted

Thanks Alexey,

How will the issues with existing option values will be updated if I use updateOptions(Collection<Option> options)

Do i need to perform a re-index or this should be automatically done ?

Thanks,

Sumit

The options themselves will be updated instantly. As for the cached index - you should reindex jira to get the new options in search results. (but inside the issues actial values will link to the new option value)

Hi Alexey,

Will you be able to help me write a script for it? I am new to scripting and wouldn't know where to begin... Sorry sad

Need to rename  about 200 values in a given custom field 

Best,

Rikkin

I used

optionsManager.setValue(Option, "<New Value>")

and it works as expected.

Thanks a ton ..!!

Regards,

Sumit

Hi Sumit,

Will you be able to please share the full script? I am trying to achieve the same thing. Need to rename  about 200 values in a given custom field. 

Best,

Rikkin

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira Service Desk

How the Telegram Integration for Jira helps Sergey's team take their support efficiency to the bank

...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...

205 views 0 2
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