I have a custom field called "Approval Needed". And within that customfield there are 5 different values.
-Immediate Execution
-Normal
-Execute Tonight
-None
-Execute before next CCB
I have been trying to figure out, with no success, how to condition scriptrunner custom email listiener, to only fire when the value of that custom field (Approval Needed), equals 1 or more of those values. I am not great at groovy. but all i can seem to figure out is:
getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Approval Needed"))
def approvalNeeded = getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Approval Needed"))
Which is passing (i think?) the value of Approval needed into the variable "approvalNeeded"
I could use a littel help with the rest of this condition..