I guess I'm misunderstanding something fundamental here. I'm running this script in the Script Console (Script Runner) and it will not assign the reporter to the issue. I don't want a work around, I'm just trying to understand how the different user objects work.
I also tried using Script Runner's built in "setAssigneeId" in fast tracks and it did not work, coming from a fast track on the Create transition.
So, what am I missing here?
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.IssueManager
//import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.MutableIssue
ComponentManager componentManager = ComponentManager.getInstance();
IssueManager issueManager = componentManager.getIssueManager()
MutableIssue issue = (MutableIssue) issueManager.getIssueObject("TFCT-9")
x = issue.getReporterId()
issue.setAssigneeId(x)
return x