Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

How to avoid duplicate issues being created by an external service

We have Jira Service Desk Cloud. We also have an external service that reports on issues every 15 minutes until the particular issue is solved. For example, we are an ordering platform for restaurants and sometimes a product order will fail to be sent onto their foodservice vendor. We have an alert from the external service that says order number xxxx failed. If the order hasn't gone through by the next time the service checks for it, we get another alert. 

The alerts come via a particular email address. The body and subject of the email is the same every time it fires.

I see one ticket per instance of an order number that is failing, so if order number xxxx is failing, I would see one ticket for the first time the service checked, then another ticket for the next time the service checked and so on.

I would like to avoid these duplicates. Since the body and subject of the emails are identical to one another, is this possible through an automation of some sort? I have ScriptRunner and Automation for Jira, but haven't been able to solve this yet.

It doesn't look like advanced mail loop detection is the right fit here since the emails are 15 minutes apart.

Thank you!

 - Drew Nedderman

1 answer

0 votes

Speaking about server here... but I think the same is true for cloud.

The default mail handlers have mail threading handling capability.

But that is based on the "message-id" header. If you can somehow cause the external service to generate and re-use a single message-id header for a given alert, then each new email will be appended as a comment on the initial issue created.

Scriptrunner doesn't come between your mail handler and the ticket creation.

The only thing that scriptrunner can do for you is react to the ticket creation, check if a similar ticket exist, then delete or discard the newest one.  But any notification associated with the ticket creation or deletion will still take place.

I'll reply back here once I've had a chance to test this. Looks like it could work.

Hi Peter-Dave, we tried sending emails that had duplicate message-id headers, but no luck. Each email created a ticket. Any other thoughts on this? Thank you!

 

 - Drew Nedderman

No other ideas. Like I said I haven't worked with Cloud much and I'm not clear on the email handler situation there.

All I'd say is to look carefully at the documentation page:

https://confluence.atlassian.com/adminjiracloud/creating-issues-and-comments-from-email-779288896.html#CreatingIssuesandCommentsfromEmail-messagehandlers

Maybe something could be done using the "in-reply-to" header.

If Else I'm New Here Jan 12, 2021

"The only thing that scriptrunner can do for you is react to the ticket creation, check if a similar ticket exist, then delete or discard the newest one.  But any notification associated with the ticket creation or deletion will still take place."

thats exactly what i am trying to do too -  delete or discard. but how do I check if it already exists in the first place? i don't want to create issue with same summary. Please help.

Thanks

Suggest an answer

Log in or Sign up to answer
TAGS

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