It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

When emails is sent with the same subject line, Jira Mail Handler creates new issue every time

Here is the scenario:


I have configured a mail handler in Jira. 

1. When I send an email it creates the initial ticket. When I "reply" to that email (same subject line), it adds it as a comment to the first ticket. This is the correct behaviour.

2. When I send an email it creates the initial ticket. When I send a second email with the same exact subject (but not reply) it will create a new ticket. This is not the correct behaviour.


The difference between the 2 cases above is that in the first case when an email is replied it adds a "Re:" to the subject line. Whereas the second case does not have that.

Any idea why I am experiencing this behaviour in case 2? Issue is that we have a 3rd party application that sends emails to the mail handler and if subject is an exact match we'd like comments to be generated rather than a new ticket. 


Any feedback will be appreciated.




2 answers

1 accepted

1 vote
Answer accepted

No, both of those are correct.  The mail handlers are built to comment when they get an email with a key in the summary that they can match to an existing issue, and otherwise create a new issue.  They're not built to de-duplicate because a lot of users don't need or want that, they rely purely on the issue key.

If you want it to assume that the summary of an issue is a unique identifier instead, then you'll need to find or write a handler that will look at it that way.

thanks for the quick response. When you say "key" are you referring to the issue key for example PROJECT-123. Because I do not include any key in the subject line. So not sure how the mail handler will find and match that.

I'd like to know how the Mail Handler differentiates between those 2 scenarios where in scenario 1 the second email has the subject line of "Re: subject line" and in scenario 2 the second email has the same subject line "subject line". 

Yes, sorry, Jira jargon - the issue Key is the project-sequence pair that humans see (your project-123), and the "id" is the numeric unique immutable issue-id in the database.

The mail handlers that ship with Jira do not care what the subject line looks like beyond looking for the (first) issue key it finds in the subject.

Imagine you have an issue with a subject of just "cheese", and a key ABC-123.

You can send more emails with subject "cheese", "re: cheese", "something about cheese" - these will all become new issues.

You then send it emails with "gruyere ABC-123", "re: [ABC-123] cheese", "cheddar ABC-123" - all of those contain ABC-123, so they will be added as comments to ABC-123 (assuming you are using the usual "create or comment" type handlers)

That is interesting. But I can say that is not the behaviour I am experiencing. 

We have set up mail handlers for anyone to report an issue by email. Once issue is created the people on the email thread have no prior knowledge of what the key is. Every time someone replies to the email, a comment is added. There is never a record of the key in the email subject yet comments get added as opposed to a new issue being created. 

I would guess that you are using Jira Service Desk there, which has a totally different mail system, and doesn't use the keys at all.  (Nor does it use the subject)

Like # people like this

We are too facing the exact situation Navid has mentioned on this thread. Not sure how to approach this problem

Are you using the service desk mail channel or Jira mail handlers?

Like Srivatsan Aravamudan likes this

Service Desk Mail channel... 

Ok, that treats all emails that do not look like replies as new requests.

I created a similar feature request here:  Feel free to vote it up. 

Sorry in your link (@Simong_Wong) is quote another link that is impossible ti reach


Can you help me? I'm facing the same problem.


It's not a "problem", it is expected behaviour.

The support request may get logged as a suggested change to Jira, but if it is, we'll need Simon to tell us what issue was created - we can't see support requests (JST issues) from other organisations.

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you