So is this working as intended? If not, is there a fix for this behaviour?
I would be grateful for any help.
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)
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.
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 (email@example.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>firstname.lastname@example.org) 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: email@example.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
Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG