From b88b8bc291f949c6c4ea6d5f0831bfc05b08e4ba Mon Sep 17 00:00:00 2001 From: Alexander Weaver Date: Tue, 3 Jan 2023 14:12:27 -0600 Subject: [PATCH] Alerting: Fix missing dashboard/panelID links in annotations (#60926) Assign thru ref --- pkg/services/ngalert/state/historian/annotation.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/services/ngalert/state/historian/annotation.go b/pkg/services/ngalert/state/historian/annotation.go index 9687b463592..a771ba0db0b 100644 --- a/pkg/services/ngalert/state/historian/annotation.go +++ b/pkg/services/ngalert/state/historian/annotation.go @@ -102,9 +102,9 @@ func (h *AnnotationStateHistorian) recordAnnotationsSync(ctx context.Context, pa return } - for _, i := range annotations { - i.DashboardId = dashID - i.PanelId = panel.panelID + for i := range annotations { + annotations[i].DashboardId = dashID + annotations[i].PanelId = panel.panelID } }