Resolve status on manually created incidents when incident is closed
Motivation
When a recovery alert comes in, we automatically resolve the corresponding incident (if applicable). Likewise, if an incident with a corresponding alert is closed by a user, the alert will automatically be marked as resolved.
With the introduction of a separate status for manually created incidents, we want the statuses to behave similarly.
Requirements
- When a manually-created incident is closed, the incident's status should automatically be set to
Resolved
- A system note should be created on the incident, with text of "changed the status to Resolved by closing the incident", similar to the comparable system note on alerts
- The status should not be changed if the issue is not an incident (ex, if an incident was created, then the type was changed. We do not want to see system notes for the status change if it's not an incident)
Edited by Sarah Yasonik