Hi all,
I am a noob at this and hope for your help:
I am working on a verification script for an app (worklog pro) but I believe this is generic JIRA logic that I just don't get.
My situation: I have a custom field that has several schemes, with options and some will get disabled. I want to get this status information and react on it.
What I have received with my tests so far was only the first easy start:
The project, the issue, the custom field plus its value:
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
def issue = worklog.getIssue();
def project = issue.getProjectObject();
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cfReference = customFieldManager.getCustomFieldObject("customfield_11300")
def reference = issue.getCustomFieldValue(cfReference)
return project.getKey() + ", Reference: " + reference;
What I want to know is: Is the option reference enabled or not?
Steps I need to take for this:
- Give me the scheme for the custom field "cfReference" that is valid in the project "project".
- Give me the status of the option "reference" in this scheme
Hope someone can help on this :-)
Thanks in advance!