add options to select with script runner in post function

Hi,

I need to dinamically add options to a single select custom field inside a post function. When jira receives an email it creates an issue and than process a transaction. Inside email there is a value that I must select in a single select custom field. But that field could not have such option. So I need to add a new option and than select it. I don't know how to add new option inside a post function.

Let say for example I have the field Colors with contains a list of colurs. User send an email containing the color to set. But the color choosed by user could not be present in the Colors field. So, if the color is purple and that option is not present, I must add a new option "purple" and than select it. I know how to select the value but don't know how to add it.

How can I add new options?

1 answer

0 votes

Hi.

We seem to have a pretty similar examples to what you are doing in our documentation.

Can you have a look here and tell me if this is what you are looking for?

Cheers!

Dyelamos

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Monday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

446 views 0 9
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