From 4cea1dbb97bc66e912c991064b0bdad8426c4128 Mon Sep 17 00:00:00 2001 From: "a.schindlbeck" <a.schindlbeck@adito.de> Date: Wed, 22 May 2019 16:19:13 +0200 Subject: [PATCH] Notification: fixes Prio --- entity/Notification_entity/Notification_entity.aod | 2 +- .../entityfields/icon/colorProcess.js | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/entity/Notification_entity/Notification_entity.aod b/entity/Notification_entity/Notification_entity.aod index b5d26731707..d9a84750737 100644 --- a/entity/Notification_entity/Notification_entity.aod +++ b/entity/Notification_entity/Notification_entity.aod @@ -55,7 +55,7 @@ </entityField> <entityField> <name>ICON</name> - <color></color> + <colorProcess>%aditoprj%/entity/Notification_entity/entityfields/icon/colorProcess.js</colorProcess> <contentType>IMAGE</contentType> <valueProcess>%aditoprj%/entity/Notification_entity/entityfields/icon/valueProcess.js</valueProcess> </entityField> diff --git a/entity/Notification_entity/entityfields/icon/colorProcess.js b/entity/Notification_entity/entityfields/icon/colorProcess.js index 923413239ed..bbb79f89e51 100644 --- a/entity/Notification_entity/entityfields/icon/colorProcess.js +++ b/entity/Notification_entity/entityfields/icon/colorProcess.js @@ -10,15 +10,13 @@ import("Notification_lib"); * ForcedPriority always goes first. If not set, it's userPriority-time. If userPrio isn't set either, the default-NotificationType-Priority ist the chosen one. */ -var typecode = vars.get("$field.TYPECODE"); +var resolvedPrio = vars.get("$field.RESOLVEDPRIORITY"); -if(typecode != null && typecode != "") - - var typeObject = notification.getType(typecode); - var priority = NotificationUtil.chooseRightPrio(vars.get("$field.FORCEDPRIORITY"), typeObject); - logging.log("realPrio: " + priority); +if(resolvedPrio != null && resolvedPrio != "") +{ + logging.log("resolvedPrio: " + resolvedPrio); - switch(priority) + switch(resolvedPrio) { case "LOW": result.string(neon.PRIORITY_LOW_COLOR); -- GitLab