From 488591560b399eb2ec840497ed6954787d547a77 Mon Sep 17 00:00:00 2001 From: ymao1 Date: Thu, 10 Dec 2020 07:20:53 -0500 Subject: [PATCH] Fixing recovered instance reference bug (#85412) --- x-pack/plugins/alerts/server/task_runner/task_runner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/alerts/server/task_runner/task_runner.ts b/x-pack/plugins/alerts/server/task_runner/task_runner.ts index 0c486dad070ef..d4143d233776a 100644 --- a/x-pack/plugins/alerts/server/task_runner/task_runner.ts +++ b/x-pack/plugins/alerts/server/task_runner/task_runner.ts @@ -491,7 +491,7 @@ function generateNewAndRecoveredInstanceEvents( const newIds = without(currentAlertInstanceIds, ...originalAlertInstanceIds); for (const id of recoveredAlertInstanceIds) { - const actionGroup = originalAlertInstances[id].getLastScheduledActions()?.group; + const actionGroup = recoveredAlertInstances[id].getLastScheduledActions()?.group; const message = `${params.alertLabel} instance '${id}' has recovered`; logInstanceEvent(id, EVENT_LOG_ACTIONS.recoveredInstance, message, actionGroup); }