diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.ts index e3d780a2254b7..91311e7517491 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.ts @@ -921,14 +921,14 @@ export class TaskRunner< ruleRunMetricsStore.incrementNumberOfTriggeredActions(); ruleRunMetricsStore.incrementNumberOfTriggeredActionsByConnectorType(action.actionTypeId); - actionsToTrigger.push(action); + actionsToTrigger.push({ ...action, lastTriggerDate: new Date().toISOString() }); } await Promise.all( actionsToTrigger.map(async (action) => { const enqueueOptions = { id: action.id, - params: { ...action.params, lastTriggerDate: new Date().toISOString() }, + params: action.params, spaceId, apiKey: apiKey ?? null, consumer: this.ruleConsumer!,