Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Mail Handler not creating tickets on the right project

Cheff I July 25, 2012

Could you kindly check on this? Issue with the email handler not creating tickets on the right project.
Issue is this: let's say we have 2 projects:

1. AAA (aaa@email.com)
2. BBB(bbb@email.com)

Let's say AAA has received a new ticket : AAA-111

When you forward an email TO: BBB@email.com
With the subject: AAA-111

Instead of Jira creating a NEW ticket under the BBB project, it UPDATES the existing AAA-111 ticket.
This happens even though the email has been sent to BBB@email.com

So I suppose this means that JIRA prioritizes the ticket number on the subject compared to the recipient? Meaning, even though the recipient was for a different project, it will update the stated ticket on the subject instead?

Is there a work around on this? Thanks heaps.

4 answers

1 accepted

0 votes
Answer accepted
Andy Brook [Plugin People]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2012

This is something that JEMH may indeed be able to help with. JEMH Configuration has a Pre-processing feature, such that you may define through a regular expression, the expected issue subject may come along like:

Re: [PStudio] (JEMH-849) Exception

So, you can define a regular expression like (look away now if you dont like regexp :P)

.* [[]PStudio[]] [(].*[)].*

In this way, you can ensure that issue notifications from the @email.com JIRA may be replied to and processed correctly, as their subject will match the above, whereas assuming you have two different JIRA's with two different 'names' (the PSTUDIO bit), it will not match and therefore normal project allocation will occur. In your case, using the project key BBB@email.com, when used with a JEMH Configuration > Project > Project Auto Assign == true setting, would deliver the behaviour you describe.

 

Cheff I July 26, 2012

Hi Andy,

Very good information; however, I don't think that would resolve my issue.

My problem is that JIRA prioritizes the ticket ID stated on the subject over the "TO" recipient of the email.

So even though an email has been sent to BBB@email.com with the subject AAA-111, AAA-111 gets updated and no ticket gets created under the BBB project.

Thanks.

0 votes
Cheff I July 26, 2012

Thanks for the help! Cheers

0 votes
Andy Brook [Plugin People]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2012

That would be the case if you are talking about the source and the destination being the same JIRA. I guess this needs another checkbox related to projectAutoAssign, 'ignoreSubjectIfAddresseeIsKey'. Its an idea and not difficult to add, logged as https://studio.plugins.atlassian.com/browse/JEMH-851 .

This feautre has now been implemented and will be available from 1.2.37 onward. It requires projectAutoAssign to be enabled, and for an addressee in the email to be matched by either a) catchemail, b) jemhAddresseeRegexp or c) Email domain Project Mapping

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2012

No, that is the correct behaviour. The email handlers always look for an issue ID in the subject first and only create a new issue in the default project if they cannot find one. This prevents the need for someone with lots of projects to have to maintain one mailbox per project.

It's not so much a "work around", but if you want to change this behaviour, you need to find or write your own email handler that will use different rules.

I'd start with a look at JEMH whenever email processing needs to be done differently, but I don't know if it can handle this case. https://studio.plugins.atlassian.com/wiki/display/JEMH/JEMH+Home

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events