From 71bc5f515fdbfb273f5be14e9a6ec311dd33a68e Mon Sep 17 00:00:00 2001
From: "s.pongratz" <s.pongratz@adito.de>
Date: Mon, 10 Aug 2020 09:43:12 +0200
Subject: [PATCH] =?UTF-8?q?#1059391-NotificationCenter=20=C3=84nderung=20a?=
 =?UTF-8?q?m=20NotificationCenter?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../DeleteNotificationtypeKeywords.xml        |  9 ++++++
 .../Data_alias/basic/2020.1.3/changelog.xml   |  1 +
 .liquibase/Data_alias/changelog.xml           |  1 +
 .../KeywordEntry_entity.aod                   |  6 ----
 .../Notification_entity.aod                   | 23 +++++----------
 .../typecode/displayValueProcess.js           |  6 ----
 .../entityfields/typecode/dropDownProcess.js  | 11 ++++++++
 .../containername_param/valueProcess.js       |  5 ----
 .../_____LANGUAGE_EXTRA.aod                   | 12 ++++++++
 .../_____LANGUAGE_de/_____LANGUAGE_de.aod     | 28 ++++++++++++++++++-
 .../_____LANGUAGE_en/_____LANGUAGE_en.aod     | 13 ++++++++-
 .../NotificationFilter_view.aod               |  1 +
 process/KeywordRegistry_basic/process.js      |  1 -
 13 files changed, 81 insertions(+), 36 deletions(-)
 create mode 100644 .liquibase/Data_alias/basic/2020.1.3/DeleteNotificationtypeKeywords.xml
 delete mode 100644 entity/Notification_entity/entityfields/typecode/displayValueProcess.js
 create mode 100644 entity/Notification_entity/entityfields/typecode/dropDownProcess.js
 delete mode 100644 entity/Notification_entity/entityfields/typekeywords/children/containername_param/valueProcess.js

diff --git a/.liquibase/Data_alias/basic/2020.1.3/DeleteNotificationtypeKeywords.xml b/.liquibase/Data_alias/basic/2020.1.3/DeleteNotificationtypeKeywords.xml
new file mode 100644
index 0000000000..43d552d2ec
--- /dev/null
+++ b/.liquibase/Data_alias/basic/2020.1.3/DeleteNotificationtypeKeywords.xml
@@ -0,0 +1,9 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+    <changeSet author="s.pongratz" id="0b393c2b-c969-41ab-9eeb-3ccaf418e069">
+        <delete  tableName="AB_KEYWORD_ENTRY" >  
+        <where>CONTAINER = 'NotificationType'</where>  
+    </delete> 
+    </changeSet>
+</databaseChangeLog>
diff --git a/.liquibase/Data_alias/basic/2020.1.3/changelog.xml b/.liquibase/Data_alias/basic/2020.1.3/changelog.xml
index ac6898c7f1..d7d38c34c2 100644
--- a/.liquibase/Data_alias/basic/2020.1.3/changelog.xml
+++ b/.liquibase/Data_alias/basic/2020.1.3/changelog.xml
@@ -2,6 +2,7 @@
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
     <include file="AlterButtonLabelTitles/AlterButtonLabelTitles.xml" relativeToChangelogFile="true" />
+    <include file="DeleteNotificationtypeKeywords.xml" relativeToChangelogFile="true" />
     <!--    disabled the following script since it is WIP-->
     <!--<include file="VisitPlanEntry/rename_VisitPlanEntry_ORGANISATION_ID.xml" relativeToChangelogFile="true" />-->
 </databaseChangeLog>
diff --git a/.liquibase/Data_alias/changelog.xml b/.liquibase/Data_alias/changelog.xml
index 415dcce416..b3fee691bd 100644
--- a/.liquibase/Data_alias/changelog.xml
+++ b/.liquibase/Data_alias/changelog.xml
@@ -14,6 +14,7 @@
     <include relativeToChangelogFile="true" file="basic/2020.1.0/changelog.xml"/>
     <include relativeToChangelogFile="true" file="basic/2020.1.1/changelog.xml"/>
     <include relativeToChangelogFile="true" file="basic/2020.1.2/changelog.xml"/>
+    <include relativeToChangelogFile="true" file="basic/2020.1.3/changelog.xml"/>
 
     <!--enable this only when you definetly want to overwrite the existing data with demo records:--> 
     <!--<include relativeToChangelogFile="true" file="basic/_demoData/changelog.xml" context="example"/>-->
diff --git a/entity/KeywordEntry_entity/KeywordEntry_entity.aod b/entity/KeywordEntry_entity/KeywordEntry_entity.aod
index 33635f5756..2d0edd64d5 100644
--- a/entity/KeywordEntry_entity/KeywordEntry_entity.aod
+++ b/entity/KeywordEntry_entity/KeywordEntry_entity.aod
@@ -583,12 +583,6 @@
           <fieldName>CategoryKeyword</fieldName>
           <isConsumer v="false" />
         </entityDependency>
-        <entityDependency>
-          <name>644a6101-6b11-4998-bd8d-b799c6f376fa</name>
-          <entityName>Notification_entity</entityName>
-          <fieldName>TypeKeywords</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
       </dependencies>
       <children>
         <entityParameter>
diff --git a/entity/Notification_entity/Notification_entity.aod b/entity/Notification_entity/Notification_entity.aod
index 990b2e7777..3650308447 100644
--- a/entity/Notification_entity/Notification_entity.aod
+++ b/entity/Notification_entity/Notification_entity.aod
@@ -27,6 +27,7 @@
       <name>STATE</name>
       <title>State</title>
       <consumer>StateKeywords</consumer>
+      <groupable v="true" />
       <displayValueProcess>%aditoprj%/entity/Notification_entity/entityfields/state/displayValueProcess.js</displayValueProcess>
     </entityField>
     <entityField>
@@ -68,9 +69,8 @@
     <entityField>
       <name>TYPECODE</name>
       <title>Type</title>
-      <consumer>TypeKeywords</consumer>
       <groupable v="true" />
-      <displayValueProcess>%aditoprj%/entity/Notification_entity/entityfields/typecode/displayValueProcess.js</displayValueProcess>
+      <dropDownProcess>%aditoprj%/entity/Notification_entity/entityfields/typecode/dropDownProcess.js</dropDownProcess>
     </entityField>
     <entityField>
       <name>VERSION</name>
@@ -119,6 +119,10 @@
           <tooltip></tooltip>
           <tooltipProcess>%aditoprj%/entity/Notification_entity/entityfields/setnotificationstate/children/setnew/tooltipProcess.js</tooltipProcess>
         </entityActionField>
+        <entityActionField>
+          <name>getNotification</name>
+          <onActionProcess>%aditoprj%/entity/Notification_entity/entityfields/setnotificationstate/children/getnotification/onActionProcess.js</onActionProcess>
+        </entityActionField>
       </children>
     </entityActionGroup>
     <entityActionField>
@@ -129,6 +133,7 @@
       <name>RESOLVEDPRIORITY</name>
       <title>Priority</title>
       <consumer>PrioKeywords</consumer>
+      <groupable v="true" />
       <textInputAllowed v="false" />
     </entityField>
     <entityConsumer>
@@ -159,20 +164,6 @@
         </entityParameter>
       </children>
     </entityConsumer>
-    <entityConsumer>
-      <name>TypeKeywords</name>
-      <dependency>
-        <name>dependency</name>
-        <entityName>KeywordEntry_entity</entityName>
-        <fieldName>SpecificContainerKeywords</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>ContainerName_param</name>
-          <valueProcess>%aditoprj%/entity/Notification_entity/entityfields/typekeywords/children/containername_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
   </entityFields>
   <recordContainers>
     <dbRecordContainer>
diff --git a/entity/Notification_entity/entityfields/typecode/displayValueProcess.js b/entity/Notification_entity/entityfields/typecode/displayValueProcess.js
deleted file mode 100644
index fcf893072c..0000000000
--- a/entity/Notification_entity/entityfields/typecode/displayValueProcess.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import("Keyword_lib");
-import("system.result");
-import("system.vars");
-import("KeywordRegistry_basic");
-
-result.string(KeywordUtils.getViewValue($KeywordRegistry.notificationType(), vars.get("$field.TYPECODE")));
\ No newline at end of file
diff --git a/entity/Notification_entity/entityfields/typecode/dropDownProcess.js b/entity/Notification_entity/entityfields/typecode/dropDownProcess.js
new file mode 100644
index 0000000000..b10dd33080
--- /dev/null
+++ b/entity/Notification_entity/entityfields/typecode/dropDownProcess.js
@@ -0,0 +1,11 @@
+import("system.result");
+import("system.logging");
+import("system.notification");
+
+var types = []
+
+for ( property in notification.getAllTypes()) {
+  types.push(property);
+}
+
+result.object(types);
\ No newline at end of file
diff --git a/entity/Notification_entity/entityfields/typekeywords/children/containername_param/valueProcess.js b/entity/Notification_entity/entityfields/typekeywords/children/containername_param/valueProcess.js
deleted file mode 100644
index 8ccc4158b0..0000000000
--- a/entity/Notification_entity/entityfields/typekeywords/children/containername_param/valueProcess.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import("system.result");
-import("KeywordRegistry_basic");
-
-
-result.string($KeywordRegistry.notificationType());
\ No newline at end of file
diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
index aac9f1e3a8..7d7faf2906 100644
--- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
+++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
@@ -6884,6 +6884,18 @@
     <entry>
       <key>Workflow deploy failed</key>
     </entry>
+    <entry>
+      <key>{SEND_MAIL}</key>
+    </entry>
+    <entry>
+      <key>New</key>
+    </entry>
+    <entry>
+      <key>Release</key>
+    </entry>
+    <entry>
+      <key>Archived</key>
+    </entry>
   </keyValueMap>
   <font name="Dialog" style="0" size="11" />
   <sqlModels>
diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
index e5de76bd0b..f3a165c300 100644
--- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
+++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
@@ -298,7 +298,7 @@
     </entry>
     <entry>
       <key>SEEN</key>
-      <value>Neu</value>
+      <value>Ungelese</value>
     </entry>
     <entry>
       <key>UNSEEN</key>
@@ -8595,6 +8595,7 @@ Bitte Datumseingabe prüfen</value>
     </entry>
     <entry>
       <key>Seen</key>
+      <value></value>
     </entry>
     <entry>
       <key>Unseen</key>
@@ -8802,6 +8803,31 @@ Bitte Datumseingabe prüfen</value>
     <entry>
       <key>Workflow deploy failed</key>
     </entry>
+    <entry>
+      <key>Download letter and create Activity</key>
+    </entry>
+    <entry>
+      <key>{SENT_MAIL}</key>
+    </entry>
+    <entry>
+      <key>Add Participants</key>
+    </entry>
+    <entry>
+      <key>and open Report</key>
+    </entry>
+    <entry>
+      <key>Add Recipients</key>
+    </entry>
+    <entry>
+      <key>New</key>
+      <value>Neu</value>
+    </entry>
+    <entry>
+      <key>Release</key>
+    </entry>
+    <entry>
+      <key>Archived</key>
+    </entry>
   </keyValueMap>
   <font name="Dialog" style="0" size="11" />
 </language>
diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
index f2827dd55b..a36b9b673f 100644
--- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
+++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
@@ -6941,7 +6941,6 @@
     <entry>
       <key>The Sales Project can only be filled when a company has been specified</key>
     </entry>
-
     <entry>
       <key>{SEND_MAIL}</key>
       <value>Send mail</value>
@@ -6952,6 +6951,18 @@
     <entry>
       <key>Workflow deploy failed</key>
     </entry>
+    <entry>
+      <key>{SENT_MAIL}</key>
+    </entry>
+    <entry>
+      <key>New</key>
+    </entry>
+    <entry>
+      <key>Release</key>
+    </entry>
+    <entry>
+      <key>Archived</key>
+    </entry>
   </keyValueMap>
   <font name="Dialog" style="0" size="11" />
 </language>
diff --git a/neonView/NotificationFilter_view/NotificationFilter_view.aod b/neonView/NotificationFilter_view/NotificationFilter_view.aod
index 65c5f94e79..2ff088a9cc 100644
--- a/neonView/NotificationFilter_view/NotificationFilter_view.aod
+++ b/neonView/NotificationFilter_view/NotificationFilter_view.aod
@@ -35,6 +35,7 @@
       <iconIdField>ICON</iconIdField>
       <entityField>#ENTITY</entityField>
       <isEditable v="false" />
+      <informationField>STATE</informationField>
     </timelineViewTemplate>
     <tableViewTemplate>
       <name>NotificationTable</name>
diff --git a/process/KeywordRegistry_basic/process.js b/process/KeywordRegistry_basic/process.js
index 04e469c42d..76562cebe0 100644
--- a/process/KeywordRegistry_basic/process.js
+++ b/process/KeywordRegistry_basic/process.js
@@ -294,4 +294,3 @@ $KeywordRegistry.visitRecommendationPrioSource$manual = function(){return $Keywo
 $KeywordRegistry.workflowCategory = function(){return "WorkflowCategory";};
 
 $KeywordRegistry.notificationState = function () { return "NotificationState";};
-$KeywordRegistry.notificationType = function () { return "NotificationType";};
-- 
GitLab