Hidden options for Custom fields via REST API

Peter Dittman March 17, 2014

Using the JIRA REST API, I'm retrieving values for custom fields using:

/rest/api/2/issue/createmeta &expand=projects.issuetypes.fields

For the custom field, the values evolve - we retire some old, add some new, making the old ones hidden.

I can get all allowed values for an issue type using createmeta, but it returns both hidden and visible options, with no way to identify which is which.

Is there a way to determine if a custom field option is hidden? Or is this a "shortcoming" that should be fixed?

thanks.

2 answers

1 vote
Boris Georgiev _Appfire_
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.
March 18, 2014

I think currently it is not possible to get disabled property of an option. The getDisabled method of the Option class is used only on one place and it is the com.atlassian.jira.issue.customfields.config.item.SettableOptionsConfigItem.getViewHtml(FieldConfig, FieldLayoutItem)

Here're some other related questions :

https://answers.atlassian.com/questions/242922/rest-api-for-custom-field-option-does-not-show-disabled-flag

https://answers.atlassian.com/questions/199122/how-to-get-the-disable-flag-in-custom-field-option-via-rest

0 votes
Trevor Hunt
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.
May 11, 2017

There is now a JIRA feature request for this:

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

 

Please go vote!

Suggest an answer

Log in or Sign up to answer