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
Community moderators have prevented the ability to post new answers.
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
Hello Rambanam,
This is unfortunately what I already checked. Sigh...
No existing plugin available for that ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is now a JIRA feature request for this:
https://jira.atlassian.com/browse/JRASERVER-60274
Go vote it up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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); }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.