How to get Custom field options in Jira Server.

Tim Benton May 21, 2021

Hi,

Needing to get the options for custom fields in Jira Server. I am able to get a list of the custom fields and a single value for a custom field.

However, am not able to get the list of options for a custom field (customfieldID_XXXX).

I have trawled everywhere and cannot find a solution.

Any suggestions would be of great help.

Thanks.

4 answers

0 votes
camus_b_li June 6, 2023

for Jira Server:

If you know the project and the issuetype that the field was used, you can try:

https://{jirahost}/rest/api/2/issue/createmeta?projectKeys={projectKey}&issuetypeNames={issuetypeName}&expand=projects.issuetypes.fields

 

If you know the issue that the field was used, you can try:

https://{jirahost}/rest/api/2/issue/{issueIdOrKey}/editmeta

 

Good luck.

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2021

Hello @Tim Benton 

How are you trying to get this information? Are you trying to get it with the API or the UI?

Tim Benton May 21, 2021

REST API

0 votes
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2021

Hi @Tim Benton  Are you trying to get Field values/list of options using REST API ?

Thanks!

Tim Benton May 21, 2021

Hi, the REST API

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2021

This is not possible with REST API.  There is no call for this. For the customFieldOption call you have to know the id, but it is at all returned when querying an issue.

Try this workaround :- https://confluence.atlassian.com/jirakb/how-to-retrieve-available-options-for-a-multi-select-customfield-via-jira-rest-api-815566715.html

Tim Benton May 21, 2021

Thanks. Is there anyway other direct way to access the fields? 

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2021

If you have jira admin permission , you can go to custom fields and check values of that custom field. 
otherwise you can see available values while creating an issue.

Suggest an answer

Log in or Sign up to answer