Hi All,
I'm trying to upadte slect list custom field while creating an issue - Using below script for this,
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.customfields.manager.OptionsManager
def componentManager = ComponentManager.instance
def optionsManager = ComponentManager.getComponentInstanceOfType(OptionsManager.class)
def customFieldManager = componentManager.getCustomFieldManager()
def cf = customFieldManager.getCustomFieldObjectByName("Blocking status")
def fieldConfig = cf.getRelevantConfig(issue)
def option = optionsManager.getOptions(fieldConfig).find {it.value == "Blocked"}
issue.setCustomFieldValue(cf, option)
This code is working in all other places except at creating an issue (eventhough I placed this script in last in order).
Is something I need to change in code for making this works at create issue wrokflow transition?
Thanks,
Sanu P Soman