Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Create Script Rest Endpoint to Update Custom Field Options

Hamdy Atakora
Contributor
September 12, 2019

Hello,

All i am trying to Create a Script  Rest Endpoint in scriptrunner that will update options of a multi select and single select custom field. The goal here is to be able to do this via the rest and without having to provide users who should update the custom field option  with admin privileges.

Please assist.

I looked into this but still not sure how to go about updating the options of the custom field 

https://scriptrunner.adaptavist.com/latest/jira/rest-endpoints.html?utm_source=product-help

2 answers

0 votes
Camille Lecerf
Contributor
June 16, 2021

Hi @Hamdy Atakora 

Did you manage to do it please?

I am also interested in this functionality.

Thanks!

Camille

0 votes
fjodors
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 12, 2019
Hamdy Atakora
Contributor
September 12, 2019

Hello @fjodors  i appreciate you taking the time to get back to me on this.

I have seen these already but these refer to how to update a custom field within an issue.

What i am trying to achieve is update the options value of a custom field in the custom field itself

See attachedScreen Shot 2019-09-12 at 10.25.38 AM.png screenshot

fjodors
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 12, 2019

Hello

Have you tried OptionsManager and OptionsService interfaces?
There are some methods for update/set customfield's options, I think these methods could be suitable
https://docs.atlassian.com/software/jira/docs/api/8.1.0/com/atlassian/jira/issue/customfields/manager/OptionsService.html
https://docs.atlassian.com/software/jira/docs/api/8.1.0/com/atlassian/jira/issue/customfields/manager/OptionsManager.html


Suggest an answer

Log in or Sign up to answer