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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Send issue commented notification to alist of users with scriptrunner

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,

Wajih

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.
Mar 15, 2023 • edited

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,
Ram

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

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,

Wajih

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events