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

This commit is contained in:
Yuri Tseretyan
2025-07-23 13:08:11 -04:00
committed by GitHub
parent d3a445409b
commit cc869e7668
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)
}