Hi there,
I have a jython script in post function to look up a user from custom field "Product Lead" and set the assignee to that user on a workflow transistion. It was working fine previously. But with recent upgrade of Jira it is not working. Any changes needs to be done on this script?
from com.atlassian.jira import ComponentManager
from com.atlassian.jira.util import ImportUtils
from com.atlassian.jira import ManagerFactory
from com.atlassian.jira.issue.customfields.manager import OptionsManager
issueManager = ComponentManager.getInstance().getIssueManager()
customFieldManager = ComponentManager.getInstance().getCustomFieldManager()
optionsManager = ComponentManager.getComponentInstanceOfType(OptionsManager)
# See if the Program Lead has a value and set the assignee to that value
productLead = customFieldManager.getCustomFieldObjectByName("Product Lead")
if productLead.hasValue(issue) :
issue.setAssignee(issue.getCustomFieldValue(productLead))
The error I get is on the last line " File "<string>", line 14, in <module> TypeError: setAssignee(): 1st arg can't be coerced to com.atlassian.crowd.embedded.api.User"