Hello,
Can you please give me script for Listener by which I can set assignee for "Issue Updated" Event. In post-function we can directly use issue.setAssignee() but the same function is not applicable in Listener.
Thanks in Advance!
Best Regards,
Shrikant Mandlik
Hello @Shrikant Pandurang Mandlik
You may need to do something like this,
IssueManager issueManager = ComponentAccessor.getIssueManager()
UserManager userManager = ComponentAccessor.getUserManager()
def issueService = ComponentAccessor.getIssueService()
def issue = event.issue
log.warn userManager.allUsers
def user = userManager.getUserByName("Assigee_Name")
def validateAssignResult = issueService.validateAssign(user, issue.id, "Assigee_Name")
issueService.assign(user, validateAssignResult)
Kindly check and let me know if it is working fine!
Regards,
Yogesh
Hi @YogeshKR ,
For each case in Script, I need different user assigned for each selection and I am not able find the appropriate solution. Can you please recorrect this script or maybe just provide me lines that can be used in the Cases.
My script is given below :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @YogeshKR ,
Any Update from your side. It would really help me.
Thanks in advance!
Best Regards,
Shrikant
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.