Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Comment as assignee automatically

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

0 votes
John Funk Community Leader Feb 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. 

0 votes
Leo Community Leader Feb 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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
4.13
TAGS
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

133 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you