Avoid duplicates with email this issue

Daniel Bermudez
Contributor
November 6, 2024

Hello, I have an issue with *Email This Issue*. For a specific project, we follow this workflow: User 1 creates the email and sends it to User 2, who replies and CCs User 3 and the email address that creates tickets in the project. User 4 does the same, CCing another user but also the email address that creates tickets in the project. This is causing a new ticket to be created each time a user CCs the same email to the ticket-creating address. I would like to know how we can configure Jira to recognize that the ticket already exists and avoid creating a new one, or alternatively, delete the duplicate.

 

image.png

2 answers

1 vote
Pablo Vergara
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.
November 11, 2024

Hi @Daniel Bermudez 

I suspect this could be primarily related to how your Jira administrator configures the Incoming Mail Handler when you receive an email to the enabled addresses.

Are they using the option highlighted in red on the attached capture? - If so, every new email would be treated as a new request/ticket to be created in Jira.

Check the "Custom email handlers" section on https://support.atlassian.com/jira-cloud-administration/docs/create-issues-and-comments-from-email/ to understand the options (there are many of them) you have to avoid duplicated tickets.

I hope this helps you!

- Pablo / SSE - ServiceRocket

2024-11-11_16-11-05.png

Pablo Vergara
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.
November 11, 2024

The following handler option might be useful to try:

Create a new issue or add a comment to an existing issue

This handler creates a new issue or adds a comment to an existing issue. If the subject contains an issue key, the message is added as a comment to that issue. If no issue key is found, a new issue is created in the default project.

 

Daniel Bermudez
Contributor
November 11, 2024

Hello Pablo, I see a problem here, mi Instance is not in cloud it is jira server, mi incoming mail handler looks like this:

image.png

And his is inside the "jira_noreply@sharesolutions.eu"

image.png

0 votes
Istvan Ascarza November 14, 2024

Hi @Daniel Bermudez

I'm from the Email This Issue support team at META-INF and I'm here to assist. If you don't have it enabled, I would recommend to use the Find Issues by references in email headers option. 

In the Email This Issue configuration menu: 

  • Go to the Mail Handlers menu
  • Configure your relevant Mail Handler
  • And check what options you have added to the Find Issues section of your Mail Handler

 

How the Find Issues by references in Email headers works: 

With this option enabled the Mail Handler will investigate the email header information like the In-Reply-To header and checks if there are any emails on your instance that relate to that email chain (This information is logged by email this issue when emails are sent or received, so we can compare that information here)

This search method will work as long as the email headers are available, even if the sender deleted the issue key from the subject field or if it's a reply. 

You can read more about this feature on our documentation page here: How to maintain email threads in Jira 

 

A bit of background information for the Mail Handler Find Issues actions:
You have the following options available: 

  • Find issues by issue key appearing in the email subject
  • Find issues by references in email headers
  • Find issues by JQL

You can configure which of these methods you would like to use and on Email This Issue for Jira Data Center you can also choose in what order you would like to perform these searches. 

If the first one does not find a valid issue to tie the email to then it goes to the second finding method and so on and so forth. As soon as one of these actions finds an issue the app will not search in any further actions but starts processing the email for the found issue.

You can read more about this in our documentation on the following link: Next Generation Mail Handlers 

 

Fetching multiple emails from an email chain that have no issues on your instance yet

Please note that if multiple emails belonging to the same email chain are fetched at the same time and there are no existing issues found for them, then they might still create new issues. This is due to the paralel processing of incoming emails.

  • For example if an email arrives to the target folder of your incoming connection,
  • but within a minute, a reply arrive to it as well. 
  • We fetch all of them at the same time and during the processing and we process two of these separately.
  • Then both will pass the find issues section of your mail handler without finding an issue 
  • And both create issues

However this should only happen rarely and only if multiple replies arrive to the very first instance of an "issue creation by email" in very quick succession. 

 

I hope this helps, but if you have any further questions or doubts, then please let me know! 

Best regards,
István

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events