The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Comment as assignee automatically

Himanshu Nanda
Contributor
February 21, 2021

As soon my ticket gets assigned, I need to add a custom public comment/mail to my customer/reporter - by the assignee, acknowledging the ticket.

I've tried using automation for jira, but it only has the option to add comment as the rule actor - which would be fixed. I need the actor to be the assignee for the respective ticket.

Is there a way to do this? If not using automation for jira, then maybe scriptrunner? OR any other plugin/post function?

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Leo
Community Champion
February 22, 2021

Hi @Himanshu Nanda,

I used below script in software project. but didn't give a shot on jsm so far. this may give you some idea to get started

 

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.comments.CommentManager

CommentManager commentManager = ComponentAccessor.getCommentManager()
def reporter = issue.getReporter().displayName
def assignee = issue?.getAssignee()

commentManager.create(issue, assignee,"Hello $reporter, this is test comment as assignee", false)

 NOTE: This is a scriptrunner's post-function script

BR,

Leo

0 votes
John Funk
Community Champion
February 22, 2021

Hi @Himanshu Nanda  - I can't imagine the system will let you post a comment in the name of someone else. That seems like it would violate some security ideas. 

DEPLOYMENT TYPE
SERVER
VERSION
4.13
TAGS
AUG Leaders

Atlassian Community Events