Auto update existing dropdown list with new options
Asked by Robin Stemmers:

Hello everyone.

I am hoping you have an answer for me. If not, well then...

Scenario

I have a drop-down field with existing options.

Field Name: **Fruit**

Field existing options

* **Apples**
* **Pears**
* **Oranges**

Now, I would like to update this field *Fruit* from another field "*Fruit not listed*"

So then if field *Fruit not listed* , has **Banana** added, I would like to update the field *Fruit* so that the options will then look like this:

* **Apples**
* **Bananas**
* **Pears**
* **Oranges**

Is something like this possible?


Answers:
author: Leo Prakash_CodeForMe_
body: Hi [@Robin Stemmers](/t5/user/viewprofilepage/user-id/2666334) ,

As [@Marc - Devoteam](/t5/user/viewprofilepage/user-id/3796976) mentioned there is no built-in components available but can be achieved through automation + rest api

Custom field options rest api documentation: [The Jira Cloud platform REST API (atlassian.com)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-group-issue-custom-field-options)

You can refer this article which describes how you can call rest api in automation: [Automation for Jira - Send web request using Jira ... - Atlassian Community](https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828)

1. Preferred trigger

2. Get field options using send web request

3. if text is one of the options retrieved, then

3.1. Update select list with text value(smart value passing)

4. Else

4.1 Send web request to add new option using option create api

4.1 Update select list with new option/text

However if your main goal is to allow **non-jira admin** to **manage field options** by themselves then you can try out our plugin [Options Manager for Jira \| Atlassian Marketplace](https://marketplace.atlassian.com/apps/1233614/options-manager-for-jira?hosting=cloud&tab=overview)

Through which you can configure who can control field options(at context level if field has more contexts)

Regards,

Leo

CodeForMe

comments: author: Robin Stemmers
body: Hi [@Leo Prakash_CodeForMe_](/t5/user/viewprofilepage/user-id/5333216) and [@Marc - Devoteam](/t5/user/viewprofilepage/user-id/3796976)

I will try this option.

Looks like I need to do some self training


author: Marc - Devoteam
body: HI [@Robin Stemmers](/t5/user/viewprofilepage/user-id/2666334)

To confirm your scenario, are you trying to take that text value to:

1. set to an existing value in a select list field, based on the text
2. potentially add a new value to a select list field

Neither one of these can be done with built-in automation rule features. Setting the select list field requires the id value, not the text name from the drop-down list.

Instead you would need to call the REST API from a web request action to do this, getting all possible values, and then matching to find the id to set the field.

If you also wanted to add new values to a select list (scenario #2) that would be a second call to a different REST API function.

comments: author: Robin Stemmers
body: Hello [@Marc - Devoteam](/t5/user/viewprofilepage/user-id/3796976)

How would one do this?


author: Marc - Devoteam
body: Hi [@Robin Stemmers](/t5/user/viewprofilepage/user-id/2666334)

[@Leo Prakash_CodeForMe_](/t5/user/viewprofilepage/user-id/5333216) explained it well.


Tags: cloud

jira-service-management

jira-service-management-cloud