Hi there,
I am looking at ways of setting the assignee on a workflow post function. Firstly I have been testing this out using the script runner console with the following piece of code that I seen Stephen Cheesley posted here
import com.atlassian.jira.component.ComponentAccessor
def issueManager = ComponentAccessor.getIssueManager()
def issueService = ComponentAccessor.getIssueService()
def userManager = ComponentAccessor.getUserManager()
def user = userManager.getUserByName("tbas")
def issue = issueManager.getIssueObject("HW_TEST-64")
def validateAssignResult = issueService.validateAssign(user, issue.id, issue.reporterId)
issueService.assign(user, validateAssignResult)
However whenever I used this script in the console it sets the assignee to whoever the reporter is on that issue, no matter who I define it should be in the script.
Am I missing something obvious here?