From e97879342d7ec7778a4e873560c33e9c7dcb1dee Mon Sep 17 00:00:00 2001
From: Benjamin Ulrich <b.ulrich@adito.de>
Date: Wed, 7 Jul 2021 07:55:07 +0000
Subject: [PATCH] =?UTF-8?q?[Projekt:=20xRM-Sales][TicketNr.:=201083788][Ve?=
 =?UTF-8?q?rtriebsprojekt:=20L=C3=B6schen=20eines=20Kontakts=20>=20System?=
 =?UTF-8?q?=20reagiert=20nicht=20mehr]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .aditoprj/ignoredScanServiceTasks.json        | 10 +--
 entity/Member_entity/Member_entity.aod        | 89 +------------------
 entity/Member_entity/documentation.adoc       | 13 +--
 .../recordcontainers/jdito/contentProcess.js  | 65 --------------
 .../recordcontainers/jdito/onDelete.js        | 16 ----
 .../recordcontainers/jdito/onInsert.js        |  1 -
 .../recordcontainers/jdito/onUpdate.js        |  1 -
 .../PrivatePersonPreview_view.aod             |  2 +-
 .../SalesprojectMain_view.aod                 |  5 --
 process/CommunicationBlacklist_lib/process.js |  1 +
 10 files changed, 9 insertions(+), 194 deletions(-)
 delete mode 100644 entity/Member_entity/recordcontainers/jdito/contentProcess.js
 delete mode 100644 entity/Member_entity/recordcontainers/jdito/onDelete.js
 delete mode 100644 entity/Member_entity/recordcontainers/jdito/onInsert.js
 delete mode 100644 entity/Member_entity/recordcontainers/jdito/onUpdate.js

diff --git a/.aditoprj/ignoredScanServiceTasks.json b/.aditoprj/ignoredScanServiceTasks.json
index 55389c39754..281e1fb24c1 100644
--- a/.aditoprj/ignoredScanServiceTasks.json
+++ b/.aditoprj/ignoredScanServiceTasks.json
@@ -220,31 +220,31 @@
       "target": "neonView/SalesprojectAnalysesPhases_view/SalesprojectAnalysesPhases_view.aod",
       "line": -1,
       "description": "Dead Reference \"#EXTENSION.Phase_filterExtention.Phase_filterExtention#TEXT\" located in: PhaseFunnelChart/defaultGroupFields/#EXTENSION.Phase_filterExtention.Phase_filterExtention#TEXT [67]",
-      "groupName": "nb-tasklist-warning"
+      "groupName": "nb-tasklist-error"
     },
     {
       "target": "neonView/SalesprojectAnalysesPhases_view/SalesprojectAnalysesPhases_view.aod",
       "line": -1,
       "description": "Dead Reference \"#EXTENSION.Phase_filterExtention.Phase_filterExtention#TEXT\" located in: PhasePieChart/defaultGroupFields/#EXTENSION.Phase_filterExtention.Phase_filterExtention#TEXT [67]",
-      "groupName": "nb-tasklist-warning"
+      "groupName": "nb-tasklist-error"
     },
     {
       "target": "neonView/SalesprojectAnalysesPhases_view/SalesprojectAnalysesPhases_view.aod",
       "line": -1,
       "description": "Dead Reference \"#EXTENSION.Phase_filterExtention.Phase_filterExtention#TEXT\" located in: PhasePyramidChart/defaultGroupFields/#EXTENSION.Phase_filterExtention.Phase_filterExtention#TEXT [67]",
-      "groupName": "nb-tasklist-warning"
+      "groupName": "nb-tasklist-error"
     },
     {
       "target": "neonView/SalesprojectConversionRate_view/SalesprojectConversionRate_view.aod",
       "line": -1,
       "description": "Dead Reference \"#EXTENSION.Month.Month#NUMBER\" located in: TreeTable/defaultGroupFields/#EXTENSION.Month.Month#NUMBER [67]",
-      "groupName": "nb-tasklist-warning"
+      "groupName": "nb-tasklist-error"
     },
     {
       "target": "neonView/SalesprojectConversionRate_view/SalesprojectConversionRate_view.aod",
       "line": -1,
       "description": "Dead Reference \"#EXTENSION.Month.Month#NUMBER\" located in: dynamicChart/defaultGroupFields/#EXTENSION.Month.Month#NUMBER [67]",
-      "groupName": "nb-tasklist-warning"
+      "groupName": "nb-tasklist-error"
     }
   ]
 }
\ No newline at end of file
diff --git a/entity/Member_entity/Member_entity.aod b/entity/Member_entity/Member_entity.aod
index 1ea06357674..528283b768c 100644
--- a/entity/Member_entity/Member_entity.aod
+++ b/entity/Member_entity/Member_entity.aod
@@ -13,7 +13,7 @@
   <contentTitleProcess>%aditoprj%/entity/Member_entity/contentTitleProcess.js</contentTitleProcess>
   <iconId>VAADIN:FILE_SOUND</iconId>
   <titlePlural>${SALESPROJECT_MEMBER}</titlePlural>
-  <recordContainer>jdito</recordContainer>
+  <recordContainer>db</recordContainer>
   <entityFields>
     <entityProvider>
       <name>#PROVIDER</name>
@@ -207,7 +207,6 @@
     </entityProvider>
     <entityProvider>
       <name>WithDistrictResponsibles</name>
-      <recordContainer>jdito</recordContainer>
     </entityProvider>
     <entityField>
       <name>UID</name>
@@ -450,91 +449,5 @@
         </linkInformation>
       </linkInformation>
     </dbRecordContainer>
-    <jDitoRecordContainer>
-      <name>jdito</name>
-      <jDitoRecordAlias>Data_alias</jDitoRecordAlias>
-      <isFilterable v="true" />
-      <contentProcess>%aditoprj%/entity/Member_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
-      <onInsert>%aditoprj%/entity/Member_entity/recordcontainers/jdito/onInsert.js</onInsert>
-      <onUpdate>%aditoprj%/entity/Member_entity/recordcontainers/jdito/onUpdate.js</onUpdate>
-      <onDelete>%aditoprj%/entity/Member_entity/recordcontainers/jdito/onDelete.js</onDelete>
-      <recordFieldMappings>
-        <jDitoRecordFieldMapping>
-          <name>UID.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>OBJECTMEMBERID.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>CONTACT_ID.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>CONTACT_ID.displayValue</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>CONTACTROLE.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>DEPARTMENT.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>ICON.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>IMAGE.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>MEMBERROLE.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>MEMBERROLE.displayValue</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>OBJECT_ROWID.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>OBJECT_TYPE.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>ORG_ORGID.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>ORGANISATION_NAME.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>PERSON_FIRSTNAME.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>PERSON_FULL_NAME.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>PERSON_LASTNAME.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>PERSON_PERSID.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>PERSON_SALUTATION.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>PERSON_TITLE.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>POSITION.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>TARGETCONTEXT.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>recordType.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>MST_MEMBERROLE.value</name>
-        </jDitoRecordFieldMapping>
-        <jDitoRecordFieldMapping>
-          <name>PERSON_ATTR_LOYALTY.value</name>
-        </jDitoRecordFieldMapping>
-      </recordFieldMappings>
-    </jDitoRecordContainer>
   </recordContainers>
 </entity>
diff --git a/entity/Member_entity/documentation.adoc b/entity/Member_entity/documentation.adoc
index 3ad972dcc80..575b84d3290 100644
--- a/entity/Member_entity/documentation.adoc
+++ b/entity/Member_entity/documentation.adoc
@@ -1,14 +1,3 @@
 = Member_entity
 
-Manages the project team in the sales project and in the campaign
-
-This entity has two recordContainers:
-
-* db
-* jdito
-
-While for the must purposes the `db`-recordContainer is perfectly fine to use there is one case necessary for the `jdito`-recordContainer:
-
-Salesproject memebers are loaded via the ``-provider and therefor use the `jdito`-recodContainer. This recordContainer first collects the data from
-the `db`-rc and then loads additional memebers of the salesprojects district. The additional members are not modifyable, while those from the
-`db`-rc are.
\ No newline at end of file
+Manages the project team in the sales project and in the campaign
\ No newline at end of file
diff --git a/entity/Member_entity/recordcontainers/jdito/contentProcess.js b/entity/Member_entity/recordcontainers/jdito/contentProcess.js
deleted file mode 100644
index db01c68c2f6..00000000000
--- a/entity/Member_entity/recordcontainers/jdito/contentProcess.js
+++ /dev/null
@@ -1,65 +0,0 @@
-import("AttributeRegistry_basic");
-import("Util_lib");
-import("system.translate");
-import("system.result");
-import("system.vars");
-import("system.entities");
-import("KeywordRegistry_basic");
-import("Sql_lib");
-
-var idValues = vars.get("$local.idvalues");
-var filter = vars.get("$local.filter");
-var memberLoadingConfig = entities.createConfigForLoadingRows()
-                                    .entity("Member_entity")
-                                    .provider("Links")
-                                    .addParameter("ObjectRowId_param", vars.get("$param.ObjectRowId_param"))
-                                    .addParameter("ObjectType_param", vars.get("$param.ObjectType_param"))
-                                    .fields(["#UID", "CONTACT_ID", "CONTACT_ID.displayValue", "CONTACTROLE", "DEPARTMENT", "ICON", "IMAGE", 
-                                                "MEMBERROLE", "MEMBERROLE.displayValue", "OBJECT_ROWID", "OBJECT_TYPE",
-                                                "OBJECTMEMBERID", "ORG_ORGID", "ORGANISATION_NAME", "PERSON_FIRSTNAME", "PERSON_FULL_NAME", 
-                                                "PERSON_LASTNAME", "PERSON_PERSID", "PERSON_SALUTATION", "PERSON_TITLE", "POSITION", "TARGETCONTEXT",
-                                                "recordType", "MST_MEMBERROLE", "PERSON_ATTR_LOYALTY"]);
-
-if (idValues)
-{
-    memberLoadingConfig.uids(idValues);
-}
-
-if (filter && filter.filter != null)
-{
-    memberLoadingConfig.filter(JSON.stringify(filter.filter));
-}
-
-var memberRows = entities.getRows(memberLoadingConfig);
-memberRows = memberRows.map(function(row)
-{
-    return [
-        row["#UID"], 
-        row["OBJECTMEMBERID"], 
-        row["CONTACT_ID"], 
-        row["CONTACT_ID.displayValue"], 
-        row["CONTACTROLE"], 
-        row["DEPARTMENT"], 
-        row["ICON"],
-        row["IMAGE"], 
-        row["MEMBERROLE"], 
-        row["MEMBERROLE.displayValue"], 
-        row["OBJECT_ROWID"], 
-        row["OBJECT_TYPE"], 
-        row["ORG_ORGID"], 
-        row["ORGANISATION_NAME"], 
-        row["PERSON_FIRSTNAME"], 
-        row["PERSON_FULL_NAME"], 
-        row["PERSON_LASTNAME"], 
-        row["PERSON_PERSID"], 
-        row["PERSON_SALUTATION"], 
-        row["PERSON_TITLE"], 
-        row["POSITION"], 
-        row["TARGETCONTEXT"], 
-        row["recordType"], 
-        row["MST_MEMBERROLE"],
-        row["PERSON_ATTR_LOYALTY"]
-    ];
-});
-
-result.object(memberRows);
\ No newline at end of file
diff --git a/entity/Member_entity/recordcontainers/jdito/onDelete.js b/entity/Member_entity/recordcontainers/jdito/onDelete.js
deleted file mode 100644
index 91caa64d3c7..00000000000
--- a/entity/Member_entity/recordcontainers/jdito/onDelete.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import("system.vars");
-import("system.entities");
-
-//While there is no need to implement the insert or update process the delete process needs to be specified because the 
-//contexts viewmodeProvider for the editView only affect insert and update (delete has no view associated)
-//let's do the db-record container the job to remove the record (additional district records can never be removed):
-var rowData = vars.get("$local.rowdata");
-var memberId = rowData["OBJECTMEMBERID.value"];
-if (memberId)
-{
-    var config = entities.createConfigForDeletingRows().entity("Member_entity").uid(memberId);
-    entities.deleteRow(config);
-}
-else
-    throw new Error("Member_entity: Could not delete member entity because the given OBJECTMEMBERID was empty.");
-    
diff --git a/entity/Member_entity/recordcontainers/jdito/onInsert.js b/entity/Member_entity/recordcontainers/jdito/onInsert.js
deleted file mode 100644
index d86d21c9884..00000000000
--- a/entity/Member_entity/recordcontainers/jdito/onInsert.js
+++ /dev/null
@@ -1 +0,0 @@
-//No insert code, because it is done in via the contexts viewmodeProvider for the editView
\ No newline at end of file
diff --git a/entity/Member_entity/recordcontainers/jdito/onUpdate.js b/entity/Member_entity/recordcontainers/jdito/onUpdate.js
deleted file mode 100644
index 1e04d32962f..00000000000
--- a/entity/Member_entity/recordcontainers/jdito/onUpdate.js
+++ /dev/null
@@ -1 +0,0 @@
-//No update code, because it is done in via the contexts viewmodeProvider for the editView
\ No newline at end of file
diff --git a/neonView/PrivatePersonPreview_view/PrivatePersonPreview_view.aod b/neonView/PrivatePersonPreview_view/PrivatePersonPreview_view.aod
index 9abc84a6764..de138a43230 100644
--- a/neonView/PrivatePersonPreview_view/PrivatePersonPreview_view.aod
+++ b/neonView/PrivatePersonPreview_view/PrivatePersonPreview_view.aod
@@ -10,7 +10,7 @@
   <children>
     <neonViewReference>
       <name>4c340a9c-252c-4708-9206-31ca98c06593</name>
-      <entityField>RecipientPerson</entityField>
+      <entityField>Persons</entityField>
       <view>ContactTitledList_view</view>
     </neonViewReference>
   </children>
diff --git a/neonView/SalesprojectMain_view/SalesprojectMain_view.aod b/neonView/SalesprojectMain_view/SalesprojectMain_view.aod
index c13e9fc067a..4adb5c12f6e 100644
--- a/neonView/SalesprojectMain_view/SalesprojectMain_view.aod
+++ b/neonView/SalesprojectMain_view/SalesprojectMain_view.aod
@@ -24,11 +24,6 @@
         <element>DESKTOP</element>
       </devices>
     </neonViewReference>
-    <neonViewReference>
-      <name>d0c1344f-c143-43b4-9c44-f823fb525eff</name>
-      <entityField>Classifications</entityField>
-      <view>ClassificationTree_view</view>
-    </neonViewReference>
     <neonViewReference>
       <name>8a83afee-e02c-4714-9641-13b62c95cea1</name>
       <entityField>#ENTITY</entityField>
diff --git a/process/CommunicationBlacklist_lib/process.js b/process/CommunicationBlacklist_lib/process.js
index 5c350a27f2f..d07d9bbd769 100644
--- a/process/CommunicationBlacklist_lib/process.js
+++ b/process/CommunicationBlacklist_lib/process.js
@@ -1,3 +1,4 @@
+import("Attribute_lib");
 import("KeywordRegistry_basic");
 import("system.entities");
 import("Util_lib");
-- 
GitLab