Incoming mail handler "Create issue" does not trigger automation

Martijn van Eijk August 28, 2020

I have JIRA Cloud and have configured a mailhandler to create issues when a mail comes in.

 

The issues are created in a Next-Gen project. This works fine.

However, I also have an Automation trigger, triggering on Created issues. This automation is not triggered for the issues created by the mailhandler.

The automation is triggered when the issues are created manually.

 

Is there a solution/workaround to be able to trigger the automation on an issue created by the mailhandler?

2 answers

1 accepted

0 votes
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2020

What do the automation logs say about these events? Can you share your automation here? Is this a new automation rule or has it previously worked?

Martijn van Eijk August 28, 2020

Thanks for looking into it!

There is nothing in the logs because the trigger is not hitting.
It works when I manually trigger it, but the hick-up here is that the Automation trigger is not hit from a "Create issue" by the mail handler.

It has not worked previously.

The automation is just
1. "When: Issue created"

2. Antyhing else (e.g. change priority to high)

But it does not get hit (nothing in the Audit log)

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2020

Hmmm, it doesn’t make sense (on the surface) that it would not trigger if your trigger event is issue created. I wonder if we are dealing with a permissions issue. Who is the creator in the case of your mail handler and do they have permissions in the project?

Martijn van Eijk August 28, 2020

The current Reporter of the issue is "Jira Automation" (I think that is a default role).
The handler has no specific permission in the project, though it can create issues, and they end up in the project fine.

I'll try if the trigger hits with another Reporter

Martijn van Eijk August 28, 2020

That actually did the trick.

Using a "default reporter" from within the project made it hit the automation trigger. Conceptual it is not really correct (since the issue was created by the mailtrigger, not by the reporter now filled in as default), but I think we can work with it for now.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2020

Well, that's very weird that Jira Automation would be the Reporter on the mail handler. Is your mail handler setup that way? 

Your other option is to set the value with a post function on the Create transition in your workflow. If there are other conditions involved with that which you can't handle in the post function (JWME or ScriptRunner add-ons would handle that), then you could set a generic field that you then base your automation rule on - Issue update trigger. 

Martijn van Eijk August 28, 2020

@John Funk I looked to the Reporter merely as the "Creator" of the ticket, but it might even be better to link the Reporter to a real person, since other notification work on the Reporter.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2020

Yes the reporter is the creator of the ticket. But it is strange that your mail handler would say that Jira Automation is the creator of the ticket, unless you are using Automation for the actual handling of the the creation. Is that case? How is your mail handler functioning? What does it look like?

Like Jack Brickey likes this
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2020

agreed

Martijn van Eijk August 28, 2020

Sorry for the confusion. I configured the mail handler indeed to have "Jira Automation" as the Reporter, since the other tickets which ARE created by automation also have "Jira Automation" as the Reporter.

I thought it would be clearer to the reader that those tickets appeared automatically on the backlog.

The Mail Handler properties are:

  • Bulk: accept
    CC Assignee: false
    CC Watchers: false
    Catch Email Address: alert@###.###
    Create Users: false
    Default Reporter: addon_com.codebarrel.addons.automation
    Notify Users: false
    Strip Quotes: false
0 votes
Benjamin Peikes June 28, 2023

I am having the same issue. We switched our "Default Reporter" to "Jira Automation" because when we had it set to a specific user, it started to fail silently when that user left the organization.

Given that "Jira Automation" user appears to be able to create tickets from other automation rules, I don't know why it wouldn't trigger a "On Create" automation rule.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 29, 2023

Hi @Benjamin Peikes  - I suggest you create a new question so that more people can see it and respond. And they can tailor answers to your specific situation. Feel free to tag me on it. 

Benjamin Peikes August 10, 2023

@John Funk - No need to ask another question. Apparently you cannot have "Jira Automation" user for the user that creates tickets based on an email handler.

For now we're just using my account as the user in the trigger, which is annoying because I get notification for the issue since I end up as the reporter.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events