Send issue commented notification to alist of users with scriptrunner

wajih zouaoui March 14, 2023

Hello community,


please i need to send notifications with issuecommented template to a list of users.

How can i trigger an event only to some specific users that i've added to variable list using a scripted listener in scriptrunner ?


thank you.


Best Regards,


1 answer

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2023

Hi @wajih zouaoui

Just a minor doubt, when you mentioned:-

please i need to send notifications with issuecommented template to a list of users.

Do you want to notify the user(s) when the issue has been commented on? If yes, this is doable using the Listener with the issue Commented event.

Also, could you please clarify what type of Jira instance you are testing this on? Is it a Jira Software or Jira Service Manager? I am requesting this information so that I can provide you with an example code.

Thank you and Kind regards,

wajih zouaoui March 15, 2023

Hello @Ram Kumar Aravindakshan _Adaptavist_ ,


thank you for the reply.

I will explain: i have setup a scripted listener to fire an event based on issue commented to reporter + assignee + watchers if the comment author is not a bot user.

We found that when the comment author is mentionning a user, this user will receive double notifications: one from the listener + one for issue mention.

Now, i'm creating a new custom listener and i've succeeded to retreive the watchers from a ticket + retreive the comment added and the user mentionned into that comment and finally add the watchers into a list except the one who has been mentionned.

Actually, i want to send a notification for the comment added to the list of watchers ( without the mentioned user ) and i didn't find how .

I can use a custom email into the script but i need to use the template from the jira for the IssueCommented event as the users will not notice the change.

Jira Datacenter : 8.20.10

JSM: 4.20.10

Scriptrunner : 6.21.0


Many thanks in advance.


Best Regards,


wajih zouaoui March 17, 2023

Hi @Ram Kumar Aravindakshan _Adaptavist_ 


I found how to fix thid issue through a scripted listener that fills a custom field user picker with the watchers except the one who is mentioned then using a new transition, with admin condition, that contains an event with this user picker CF and it will be fired by the script.

Actually, the mentioned user is no more receiving double notifications when he is mentioned into a comment.


Best Regards,


Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events