Create multi-select custom field with options using rest-api in jira server 8.4

Fayaz Abdul October 3, 2019

Hello,

 

I am trying to create a multi-select custom field with options like test1,test2,test3 using rest-API in Jira server 8.4.

Using https://jira.com/rest/api/2/field 

raw(JSON)

{   "name""ReTest field",

    "description""Custom field for testing",   

    "type""com.atlassian.jira.plugin.system.customfieldtypes:multiselect",   

    "searcherKey""com.atlassian.jira.plugin.system.customfieldtypes:multiselectsearcher"

}

But there is no options in it.

Please help me to create with options using rest api.

Thank you

Fayaz

2 answers

1 vote
Surya U N
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!
October 21, 2020

Not sure if this would help you now. Might help someone else!

There's a work-around that solved this issue.

1) Create the custom field using POST /rest/api/2/field and body json as you do.

2) After the custom field is created (it'll be created without options), you can POST to /rest/globalconfig/1/customfieldoptions/{custom_field_id} with the body json as below:

[{"name":"option1"}, {"name":"option2"}]
0 votes
Elifcan Cakmak
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.
October 3, 2019

Hello,

I think that's not possible at the moment. I found this related ticket about the issue:

https://jira.atlassian.com/browse/JRASERVER-36112

It's still in gathering interest status. Although you can check out plugins for this issue like:

https://marketplace.atlassian.com/apps/1217643/extender-for-jira?hosting=server&tab=overview

Regards.

Elifcan

Suggest an answer

Log in or Sign up to answer