Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create a custom field option using ScriptRunner?

David Shahbazyan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 7, 2026


I want to add a new option to a custom field from an issue. For example, when an issue is created and a field contains the value "Milk", I want that value to be added as an option to the "Groceries" custom field.

How can I achieve this? Can it be done using ScriptRunner or another approach?

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Jeroen Poismans
Community Champion
April 7, 2026

Hi and welcome to the community,

On Cloud also Scriptrunner is dependant on what Atlassian exposes via REST API. But good news! There is a documented REST api doing exactly that:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-post

Have a look at the documentation. You can either use HAPI within Scriptrunner (if this particular call is available), if not you can still just do a REST request following the documentation in the link.

Jeroen Poismans
Community Champion
April 7, 2026

As a matter of fact there is an exact example of this in the Scriptrunner library:

https://www.scriptrunnerhq.com/help/example-scripts/add-options-to-custom-field-cloud

Like David Shahbazyan likes this
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events