script for workflow condition

Idan Malul April 26, 2018

Hi, 

 

I am trying to run this script on the workflow condition and got an error. 

 

 def issueManager = ComponentAccessor.getIssueManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cField = customFieldManager.getCustomFieldObject("customfield_11523")

def faveFruitFld = getFieldById("customfield_11523")
def optionsManager = ComponentAccessor.getOptionsManager()
def customField = customFieldManager.getCustomFieldObject(faveFruitFld.getFieldId())
def config = customField.getRelevantConfig(getIssueContext())
def options = optionsManager.getOptions(config)
def optionToSelect = options.find { it.value == faveFruitFld.getValue() }
if (optionToSelect.optionId == 20113)
{
return true
}
}

 

Please advise.

1 answer

0 votes
Ivan Tovbin
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.
April 30, 2018

Hi Idan,

I'm a bit confused by your code. Could you please explain what exactly you are trying to accomplish?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events