Automatic assignee regaurding status in jira cloud

Abhishree Nagesh January 9, 2019

Hi,

We are using jira cloud.

Automatic assignee in project scheduling status which was assigned in IT review status.

using script runner add on .

so please anyone suggest me code.

 

Regards,

Abhishree Nagesh

1 answer

0 votes
Peter Bengov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2019

Hi @Abhishree Nagesh we are using this script. Sending it the username and it assigns the relevant person during Post Function. 

 public static def setAssignee(String assigneeToSet, Issue issue) {
def issueManager = ComponentAccessor.getIssueManager()
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
ApplicationUser userToSet = ComponentAccessor.getUserManager().getUserByName(assigneeToSet);
issue.setAssignee(userToSet);
issueManager.updateIssue(currentUser, (MutableIssue)issue, EventDispatchOption.ISSUE_ASSIGNED, false);
}

Please note, this works for Jira Server

Abhishree Nagesh January 9, 2019

@Peter Bengov

In which parameter of the post function the code must be placed in script runner.

Regards

abhishree

Suggest an answer

Log in or Sign up to answer