From 8aa9921c9f4ba025ae3b0318b95732266d33d186 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 4 Jan 2023 11:19:25 +0100 Subject: [PATCH] [v9.3.x] Alerting: Fix missing dashboard/panelID links in annotations (#60927) Alerting: Fix missing dashboard/panelID links in annotations (#60926) Assign thru ref (cherry picked from commit b88b8bc291f949c6c4ea6d5f0831bfc05b08e4ba) Co-authored-by: Alexander Weaver --- 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 c94805178af..d9997be4628 100644 --- a/pkg/services/ngalert/state/historian/annotation.go +++ b/pkg/services/ngalert/state/historian/annotation.go @@ -98,9 +98,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 } }