Create issue which is already associated with the alert
What does this MR do and why?
Related issue: #330284 (closed)
Associates alerts with incident issues on creation, rather than as a post-creation task. This allows the behavior in IssuableEscalationEtatuses/CreateService
to be utilized from Issues::CreateService
.
This is not user-facing.
How to set up and check for regressions locally
- Open a project with an escalation policy in EE (
Monitor > Escalation policies
to create a policy) - Navigate to
Settings > Monitor > Alerts > Current integrations
- Create & enable a new
HTTP Endpoint
alert integration if none exist - For an existing integration, click
> Send test alert
to trigger a test with a sample payload, like this one:{"title":"Triggering a test alert to associate with an incident"}
- Navigate to
Monitor > Alerts
to find & open the detail view of the new of alert - Click
Create incident
& see that the incident got created - In rails console, check that the alert is associated with the incident & the escalation policy
issue = Issue.last! issue.alert_management_alert #=> should be present issue.escalation_status.policy #=> should be present
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Sarah Yasonik