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

Hello,

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

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,314 views 14 20
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot