import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.IssueManager import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.event.type.EventDispatchOption; def issueManager = ComponentAccessor.getIssueManager(); //def currentIssue = Issues.getByKey("TEST2-2") as MutableIssue def currentIssue = event.issue as MutableIssue def components = currentIssue.getComponents() //如果存在多个模块,这里只取第一个模块的lead def componentLeader = components.getAt(0).componentLead currentIssue.setAssignee(componentLeader) issueManager.updateIssue(ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(), currentIssue, EventDispatchOption.ISSUE_UPDATED, true);
Overview
Content Tools