Scripted Listener custom email sending duplicate notifications

We're using a scripted listener to send a custom email on an event that's triggered by a workflow post-function. The problem is that sometimes, users get duplicate notifications, and it's unclear why. Here's what happens.

  1. The issue is created through a mail handler with JEMH. The CC users are set as Watchers, as well as members of two other user custom fields.
  2. The custom Created event triggers the custom email listener, who sends the email to the Reporter and Assignee, and cc to the watchers and the members of the other 2 custom fields.
  3. The users will receive up to 3 identical emails sent simultaneously by the scripted listener

 

I suspected this had something to do with the custom fields notified in cc, but it doesn't really make sense, because all extra mails are sent to the same users in TO and CC, exactly as if the listener runs several times. However, I could see that the event was only sent once, and that the outgoing email log doesn't report any timeout errors that could explain this (https://confluence.atlassian.com/jirakb/read-timed-out-error-when-sending-outbound-mail-from-jira-applications-240193685.html)

 

To make matters worst, it seems to be intermittent, with only some of the tickets in this project being affected. It also occurs on other events, like Issue Resolved.

 

We have other similar listeners enabled on other projects, but this behaviour can't be reproduced apart from this one project.

Anybody has an idea on what it could be?

 

We're running jira server 6.3.10 with ScriptRunner 3.1.4

 

 

1 answer

Hi Nicolas.

This is a known SR bug, that you can watch and read about in our customer support portal, in the relevant issue, which is here.

As you can see it affected 4.3.8 and below, so if you don't want to update your instance I'm afraid there's nothing more we can do for you.

Do say if I can help you further.

Cheers!

Dyelamos

Hi Daniel,

The issue you linked doesn't really sound like my issue at all.

In my case, there's no duplicate attachment in the notification email. What happens is that emails are sent twice, as if the event was processed twice. The atlassian-jira-outgoing-mail.log in DEBUG clearly shows two identical, successful attempts to deliver the email within about 50ms, even though there's only one event that was sent, as we can see from the events log

I looked at the existing SRJIRA issues, and I didn't find one that looks like my issue.

Nicolas

we are having same issue, have you been able to resolve?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

89 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you