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:

  • 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 votes

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
  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
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

226 views 4 1
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