Hi Everyone,
I need a script which helps in assigning a defined user(User will be written in script) automatically to a issue.
Using Script Runner in Escalation Services.
Thanks in Advance
Hi and welcome @Raj ,
You will find useful inputs in this thread : https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-update-issue-and-set-assignee/qaq-p/552423
Antoine
Hi @Antoine Berry ,
Thanks for the response.
i tried this code in the provided link earlier, but its not working to assign a assignee automatically using escalation services.
Can you please try to provide a code which can help me in executing this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Raj ,
I tried the code I found in this thread, with adding the imports, and it worked :
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.event.type.EventDispatchOption
def user = ComponentAccessor.getUserManager().getUserByKey("berry_a")
MutableIssue mutableIssue = ComponentAccessor.getIssueManager().getIssueByCurrentKey(issue.getKey());
mutableIssue.setAssignee(user);
def issueManager = ComponentAccessor.getIssueManager();
issueManager.updateIssue(user, mutableIssue,EventDispatchOption.ISSUE_ASSIGNED, true);
Antoine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.