Mail-In creates comment in Project without mailhandler

Following situation:

  • I have 2 projects
    • Project A (Key: PA) has a configured mailhandler
    • Project B (Key: PB) hasn't a configured mailhandler
  • now I send a email with the subject "bug-fix for PB-55" to the email adress of the handler in Project A
  • then JIRA creates a comment in the ticket PB-55 and doesn't create a new ticket in Project A (like I would expected)

So is this working as intended? If not, is there a fix for this behaviour?

I would be grateful for any help.

3 answers

1 accepted

This widget could not be displayed.

It is working exactly as intended.

You don't really associate an email handler with a project. What you're actually configuring is a fall-back. That is, if the handler is not able to work out which issue the incoming email is about, which project it should drop the email into.

All the off-the-shelf handlers are like that, they try to match existing issues first, then create in a project if they fail to match.

There is a fix, if you're willing to do a bit of coding - write your own handler! Or find one that works better for you. (And I can never end an answer about Jira email handlers without pointing at JEMH and telling you that it is almost certainly capable of making Jira incoming email do what you want)

This widget could not be displayed.
You could also leave the dash out of your ticket reference in the email summary line or move the ticket reference to the body of the email so the handler won't interpret it as a comment on the existing ticket.

In a nutshell this is it, if you happen to include text in the subject of an email that matches a known issue key, most email handlers will use that as a driver for issue identification for commenting. Really, the easiest way to stop this is to not use text that matches other priojects issue keys.

This widget could not be displayed.

In this case it seems like you want to create some linkage between a new issue in project A with something in project B (otherwise, why mention PB-55 in the sujbect). This is a textual linkage to the issue, what would be a better outcome is if the created issue in A actually had a JIRA issue link to PB-55. As Nic says, JEMH can help with the Email > Pre-Processingoption:

If the addressee (projkey@place.com) matches a known project key and projectAutoAssign is enabled, the subject will not be used as a basis for a comment, and will be created in the nominated project instead

Now this is a little more specific than your use case, as its solving a larger problem, how to address email to many projects in a scaleable way. One of JEMH features is auto-assign, where the addressee of an email (eg <strong>abc@place.com) is used as the target project issue key. In this way, JEMH can route traffic to project abc, and in so doing, also link the created project to PB-55, using a Subject Directive that looks like:

MIME-Version: 1.0 Received: by 10.223.112.12 with HTTP; Sat, 18 Jun 2011 22:42:26 -0700 (PDT) Date: Sun, 19 Jun 2011 17:42:26 +1200 Message-ID: <BANLkTinB1mfSh+GwOXGNWoL4SyDvOpdBoQ@mail.gmail.com> Subject: some text #linkTo=PB-55/relates From: "Andy Brook" <andy@localhost> To: pa@mysystem.com Content-Type: text/plain; charset=UTF-8 some text

For this to work JEMH needs to know that the addressee is an incoming address, so the jemhAddresseeRegexp needs to match, for example .*@mysystem.com

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 Wednesday 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...

232 views 3 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