From 3e39e7e61d668b0b5ce67da4d82cfed30ed24853 Mon Sep 17 00:00:00 2001 From: Surya Sashank Nistala Date: Mon, 22 May 2023 16:11:02 -0700 Subject: [PATCH] accept workflow argument in chained alert constructor Signed-off-by: Surya Sashank Nistala --- .../kotlin/org/opensearch/commons/alerting/model/Alert.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt index 763c541f..c793fc04 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt @@ -56,9 +56,9 @@ data class Alert( schemaVersion: Int = NO_SCHEMA_VERSION, executionId: String, chainedAlertTrigger: ChainedAlertTrigger, - user: User + workflow: Workflow ) : this( - monitorId = NO_ID, monitorName = "", monitorVersion = NO_VERSION, monitorUser = user, + monitorId = NO_ID, monitorName = "", monitorVersion = NO_VERSION, monitorUser = workflow.user, triggerId = chainedAlertTrigger.id, triggerName = chainedAlertTrigger.name, state = state, startTime = startTime, lastNotificationTime = lastNotificationTime, errorMessage = errorMessage, errorHistory = emptyList(), severity = chainedAlertTrigger.severity, actionExecutionResults = emptyList(), schemaVersion = schemaVersion,