From 33ac5eda6e73acfc563f5d259c842a72c44973ce Mon Sep 17 00:00:00 2001 From: Steffen Weinstock <79531202+stewsk@users.noreply.github.com> Date: Thu, 15 May 2025 17:38:27 +0200 Subject: [PATCH] Notifications: use proper status code Comments and notification title suggest that a notification is sent when an incident is _resolved_. Status code for reolved is `R`, while `C` is closed. --- xmpls/alert-notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmpls/alert-notifications.js b/xmpls/alert-notifications.js index 90b5b5c6..2f9c62ac 100644 --- a/xmpls/alert-notifications.js +++ b/xmpls/alert-notifications.js @@ -29,7 +29,7 @@ module.exports = class ProcessorService extends cds.ApplicationService { * Send a notification using a pre-defined template when an incident is resolved. */ this.after ('UPDATE', Incidents, async incident => { - if (incident.status_code === 'C') { + if (incident.status_code === 'R') { let customer = await customer4 (incident) await alert.notify ('IncidentResolved', { recipients: [ customer.id ],