De-Duplication based on Subject that includes the same Ticket Number

Travis Ashe
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 29, 2023

We receive alerts via email integration and each time a comment is made on the ticket a new alert is created and initiates a new call.  I would like to suppress the alerts when comments are made on the same ticket but I am unsure how to properly code the Alias to pull the Incident number ensure this happens.  Can someone help?

Example: 

1. Incident created and OpsGenie receives an email that has a subject that starts like this.....  Incident #82201 Can't Sign into my computer

2. When comments are made on the ticket then OpsGenie receives additional emails that look like this in the subject...  RE: Incident #82201 Can't Sign into my computer

I need to create an alias that pulls the Incident number from the subject and suppresses the additional alerts when a comment is added to a ticket and when the ticket is closed.

Thank you!

 

1 answer

0 votes
Talar Pavlovic
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 1, 2023

Hey there Travis, 

Thanks for writing into Community, I'm Talar from the Atlassian Opsgenie support team, happy to help!

If you're on Standard or Enterprise plans, you absolutely can - via some fancy String Processing / Regex. This also works for other fields + info - sometimes the Regex can take a little time to get right, so don't be afraid to test it out! 

Since your email will sometimes start with "Incident..." and other times with "RE: Incident.." I'd recommend "hard-coding" the Incident part into the Alias, and pulling out the #<number> from the subject via regex. 

Something along these lines should do the job for you (it may need some finessing based upon how your email is parsed once it comes through): 

  •  "Incident {{subject.extract(/Incident (\S+)/)}}" 

Basic steps: 

  1. Go to the integration (via Settings -> Integrations) 
    • NOTE: If you're unable to see this, its likely due to your user role + permissions - please consult your Opsgenie Owners/Admins
  2. Under "Incoming | Rules for creating and processing alerts" click on the "Create Alert" action, then "Show all properties"
  3. This will give you the below screen:Screenshot 2023-10-02 at 10.25.26 am.png
  4. Insert the regex, then click Save
  5. Send through a test email, and see if it pulls out the data you're looking for, update and test as required until the Alias looks exactly how you'd like it! 

Hope this helps! 

- Talar

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events