In my environment I have an integration of Datadog and JSM, that is, when there is an alert, a ticket is created automatically.
I would like to know if there is a way to create an automation that, if there is already an open ticket, do not open another one.
Hi!
I'm not sure how the current integration is set up, but it can be a bit tricky to prevent tickets from being created unless it is automation that is creating them. However, you should be able to set up an automation that will close an issue as a duplicate.
It might look something like this:
Cheers,
Brydie
Isso não seria o ideal para mim, mas ajudaria se você adicionasse na automação, depois de Concluído, incluir um comentário de que o ticket criado anteriormente (se estiver no status Aberto) já está sendo tratado. Seria algo assim:
This ticket is already being handled in ticket {{issue.key}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Marlon Bacala which app? Jira Automation?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Diana_Architect_ZigiWave it is this https://www.atlassian.com/devops/observability-tutorials/jira-datadog-integration.
I integrated datadog with Jira. It seems to be working since I followed this document https://www.atlassian.com/devops/observability-tutorials/jira-datadog-integration. However I got stuck in section 2 (Automatically create issues from Datadog alerts). Ticket is automatically created once alert is triggered however it creates a duplicate ticket when alert is re triggered. Can anyone help thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In case anybody stumbles into this problem again, the expression is in the right path, but it is far from correct.
Something like this is more correct (but still not perfect):
```
status NOT in ('Done') AND key != {{triggerIssue.key}} AND summary ~ '{{triggerIssue.summary.replaceAll("\\]", "\\\\\\\\]").replaceAll("\\[", "\\\\\\\\[")}}'
```
You need to avoid checking the issue against itself or against closed tickets. But then, you also need to escape the characters in the summary. In particular `[`which is a parameter in datadog
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Anthony Morais hi! Hope you've found the reason behind the duplication issue. May I ask if you're using any additional tools to establish the integration? Perhaps the problem comes from it? I'd go back and see if the mappings are set properly. If, at some point in the future you happen to have a similar project and you're open to using a 3rd party solution - check out ZigiOps. It can help you connect the two systems and sync their data. It had advanced mapping settings so it would not allow any duplication. Feel free to look at it and if you decide you'd like to know more about it work - you can secure a demo meeting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.