Use of automation for comments added via Jira's mail handlers

Rick Olson January 10, 2022

I have a third-party system sending comments to Jira's inbound email handler. These comments are loaded corrected against the issue shown in the subject line.

When these comments are applied, I need to send an email to the assignee of the issue to let them know what the comment is. Without this, the assignee doesn't know to go look at the comment.

I've tried using the Issue commented trigger, but the automation rule doesn't execute.

Has anyone been successful in sending an email when a comment is added via Jira's inbound email handler? If so, how?

2 answers

1 accepted

0 votes
Answer accepted
Rick Olson January 18, 2022

@Bill Sheboy 

The Atlassian support teams spent a few days working with this scenario, but they managed to convey it to me and it does work.

Three steps:

1. Set up your incoming mail server and then set up your mail handler. In my mail handler I used 'Automation for Jira' as my Default Reporter. I used that name so that my users know that the comment wasn't added by a Jira user since the default reporter name shows up when looking at the comment once it is added to the issue.

2. Add a user to Jira with the email address of where the incoming email will be sent from. Once added, disable this user from having access to your site. I can't find anywhere that this is spelled out in documentation, but it's the once thing that the support team had me do.

3. Create an automation rule using "When: Rule is triggered on" and the Comment type to select is  "Comment is the mail action". The rest of the automation can be whatever you want.

That now works for me!

 

-Rick

Rick Olson January 18, 2022
Like Bill Sheboy likes this
1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 10, 2022

Hi @Rick Olson 

According to the suggestion below, there is no way to detect the comment source when from the email handler: [AUT-255] Trigger "Issue Commented" enhancement request - Issue_Commented_From_Email - Code Barrel JIRA (atlassian.net)

The suggested work around is to use the Issue Updated trigger and then perhaps use the changelog to determine if it was the comment which changed.

Kind regards,
Bill

Rick Olson January 10, 2022

Bill,

That was a good idea. I update the Issue Updated trigger, but the rule doesn't run. When I looked at the History for the issue, there is no data about the comment being updated.

Thanks for the idea though!

-Rick

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 10, 2022

Whoa...I would have expected to see something in the log.  The comment did get added by some process.

If you are on a paid license (not free) I recommend working with your site admin to submit a ticket to support to learn if that is a different defect: not logging in the history the comment was added.  Then you can post back here what you learn.

Here is the link to submit the ticket: Atlassian Support

Rick Olson January 11, 2022

I, too, was surprised. I'm the site admin and I did log a ticket with the support team yesterday. When they reply, I'll post what they have to say. Oh, and yes, we are on a paid Premium license.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer