[release-12.1.0] Alerting: Fix active time intervals when time interval is renamed (#108547)

Alerting: Fix active time intervals when time interval is renamed (#108534)

(cherry picked from commit cc869e7668)

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
grafana-delivery-bot[bot]
2025-07-23 18:26:50 +01:00
committed by GitHub
co-authored by Yuri Tseretyan
parent ee5cc5a271
commit 2a87c627ad
3 changed files with 12 additions and 1 deletions
@@ -440,6 +440,12 @@ func replaceMuteTiming(route *definitions.Route, oldName, newName string) int {
updated++
}
}
for idx := range route.ActiveTimeIntervals {
if route.ActiveTimeIntervals[idx] == oldName {
route.ActiveTimeIntervals[idx] = newName
updated++
}
}
for _, route := range route.Routes {
updated += replaceMuteTiming(route, oldName, newName)
}