email handler problems - won't create in correct Project

Hi, what tells the handler to create an issue in the correct Project? I have included a key in the mail subject but the only way I can get get email creating issue in correct Project is to only have one handler - not ideal (or correct)

3 answers

Show us the config for you email handler.

The handler will only create issues into SERV341232. This is documented behavior:

https://confluence.atlassian.com/adminjiraserver073/creating-issues-and-comments-from-email-861253784.html#Creatingissuesandcommentsfromemail-Createanewissueoraddacommenttoanexistingissue

  • This field is only relevant for issue creation, not for issue commenting.
  • If an email message contains an issue key in its subject line and that issue key exists in your JIRA installation, the handler will add the email message content as a comment on the issue, regardless of which project the issue is in.
0 vote

It is the project you define in the handler.

If you include an existing issue key in the subject, then it will comment on that issue.  Otherwise, it will create a new issue in that project.

Are you seeing it create in other projects?

Yes. With the Project key (no issue key as I want it to create a new issue) it creates in the first handler in my list NOT the desired Project with the appropriate key. I would expect the key determine the Project surely?

That's not how it works.

Not much of answer there. What I would expect is that for each Project I create, I can configure a mail handler which examines incoming mail and creates an issue in the appropriate Project going on the Project key showing in the Subject line. If that is not the case then I need to revisit my thinking and expectations here. I can not add an issue id as I wish to create a new issue. BUT I have a number of Projects and a central JIRA admin email address. External users/testers/team members on each Project need to be able to quickly and easily create an issue on the correct Project.

The feature clearly states that it will create new issues into the project you select, and the documentation makes it even more clear. 

You cannot do what you want out of the box.

  1. Create your own email handler to support the business logic
    https://developer.atlassian.com/jiradev/jira-platform/guides/email/tutorial-custom-message-mail-handler-for-jira
  2. Using an IMAP inbox, preprocess your emails using PostFix and send them to correct folders within the IMAP inbox folder structure. Then use an IMAP Jira Incoming Mail Server specific to one folder per project.
  3. Use one inbox per project email handler, as the product supports out of the box.

There's no other way, and simply providing a project key will do nothing, as the handler is not designed for that and doesn't work like that.

The email handlers cannot begin to guess where an email may be bound, and they pick up mail asynchronously - for any given email, you can't say which handler will get to it first.

The handlers all have the "project" setting, so the first handler to catch any email will create it in their project.

The way to handle multiple projects is to have different email addresses, one per project, then you can do a simple handler per project.

That said, it's the off-the-shelf behaviour.  If you're willing to invest in code or add-ons (JEMH is the one I usually start talking about), it is possible to create a handler that uses other rules, including parsing subjects or content, and making decisions based on them.

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 Confluence

Color tables for a shiny Confluence page

...; ## Developed by: Alana Fernando ## Shared with love ## @param style:title=style type|type=enum|required=true|desc=Choose a style.|enumValues=Style1,Style2,Style3,Style4,Style5 ## @param alignment:title...

151 views 8 11
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