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.
Hi @Raj ,
I tried the code I found in this thread, with adding the imports, and it worked :
import com.atlassian.jira.issue.MutableIssueimport com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.event.type.EventDispatchOptiondef 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 Berry Thanks a lot for your script. it working as expected.
It looks like you're new here. Sign in or register to get started.