JIRA Mail Handler: can you set a custom field and then assign a reporter based on that field?


We've just completed an upgrade to our in-house CRM. This application sends notifications using TO, CC and BCC. When one of our technical users adds a note that needs additional action taken on it, they will CC it to an e-mail (mailer@mydomain.com) designated for JIRA to create a ticket.

With our old CRM, each user would send notifications using their default mail client (MS Outlook), so the FROM address would be from the user who sent the note. When JIRA received it, it would use that to assign the reporter.

In our new CRM, when a user sends a notification, the mail client is instead using a mailer api, so the FROM address is now an application e-mail (myapp@mydomain.com).

The e-mail that gets sent will always show what user added the notification, so you have something like this from John Doe:

Notification sent from jdoe (tech) - 01/01/15 9:00 PM:

Here is my note about the customer and any actions that took place as well as actions that may need to take place.

Customer information here

What I'd like to do is use some kind of mail handler and custom key (maybe script) to pick up on "Notification sent from" as the custom key and take the next string as the value, then set that value as the reporter.

Some users do not use JIRA. So I'd need to do something similar to this:

sentBy = jdoe
If (sentBy is not a JIRA user), set reporter as anonymous (or default if needed)
Else set reporter of ticket to sentBy


Update: The user's JIRA user and username pulled by the application are the same because they both come from Active Directory (jdoe = jdoe@mydomain.com).


Am I explaining this correctly? I couldn't find any current articles in the knowledge base that really fit (may have not used the right words).


Thank you


1 answer

This widget could not be displayed.

If you feel like it you can create custom mail handler, see here https://developer.atlassian.com/jiradev/jira-platform/email/tutorial-custom-message-mail-handler-for-jira 

This way you can handle the message just about any way you want. Take a look at CreateIssueHandler JIRA source distribution to get the idea of what needs to be done.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

77 views 1 0
Join discussion

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