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

How to get the 'disable' flag in custom field option via REST ?

Valerie AQUILA August 7, 2013

In Jira, we can enable/disable a custom field option to make it available or not when creating/editing an issue.

Is this data available via REST ?

I can't see it in the doc

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
RambanamP
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.
August 7, 2013

as of now it is not availabel in jira to disable option

check here to know what are the REST Api's avilable in latest version

https://docs.atlassian.com/jira/REST/latest/#idp627040

Valerie AQUILA August 7, 2013

Hello Rambanam,

This is unfortunately what I already checked. Sigh...

No existing plugin available for that ?

1 vote
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

Go vote it up.

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 6, 2018

Enhancer Plugin has custom field options REST service in which you can filter agains enabled/disabled.

JIRA_BASE_URL/rest/jep-api/latest/customfield/{customfieldId}/options?projectKey=NP&issueTypeId=1&onlyEnabled=true

0 votes
RambanamP
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.
August 7, 2013

you can disable options by writing some script using script runner plugin

https://jamieechlin.atlassian.net/wiki/display/GRV/Script+Runner#ScriptRunner-CustomFields

the following code is on java API you need to change it to Groovy and for one option disable you have to change logic to do for multiple

CustomField customfield = cfManager.getCustomFieldObjectByName("CustomfieldName");
if(customfield!=null){
IssueContextImpl issueContext = new IssueContextImpl(issue.getProjectObject(), issue.getIssueTypeObject());
FieldConfig fieldConfig = customfield.getRelevantConfig(issueContext);
OptionsManager optionsManager = (OptionsManager) ComponentManager.getComponentInstanceOfType(OptionsManager.class);
Option op=optionsManager.getOptions(fieldConfig).getOptionForValue("test", null);
optionsManager.disableOption(op);
}

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events