Don't change escalations if neither status nor policy changed
What does this MR do and why?
This fixes a bug where a system note was emitted with policy on any change.
Found during !100028 (diffs, comment 1125049757).
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
Visually
- Add escalation policy
- Create incident manually
- Assign an Escalation Policy from the sidebar dropdown
-
👁 See system noteYOU paged escalation policy NAME just now
- Change unrelated/arbitrary issue attributes
- Assign Severity
- Change Title
- ...
-
👁 ❌ No system notes about escalation policy✅ - Resetting Escalation Policy still emits a policy system note
✅
Spec
# Passes
bin/rspec ee/spec/services/ee/incident_management/issuable_escalation_statuses/after_update_service_spec.rb
# Back to master
git checkout master -- ee/app/services/ee/incident_management/issuable_escalation_statuses/after_update_service.rb
# This fails :boom:
bin/rspec ee/spec/services/ee/incident_management/issuable_escalation_statuses/after_update_service_spec.rb
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 Peter Leitzen