From 64c61e0f77f1eaa996fbc48d1a1b4120676ad1ee Mon Sep 17 00:00:00 2001
From: Johannes Hoermann <j.hoermann@adito.de>
Date: Mon, 4 Nov 2019 16:39:27 +0100
Subject: [PATCH] Fix ScanService Warnings

---
 ...DuplicateScannerPrefilterConfig_entity.aod |  4 +-
 .../onValueChange.js                          |  0
 .../valueProcess.js                           |  0
 .../Organisation_entity.aod                   | 36 ---------------
 .../children/filtername_param/valueProcess.js |  2 -
 .../recordidtoignore_param/valueProcess.js    |  3 --
 .../resultfields_param/valueProcess.js        |  3 --
 .../valueProcess.js                           |  2 -
 .../targetcontext_param/valueProcess.js       |  2 -
 .../targetentity_param/valueProcess.js        |  2 -
 .../valuestoscan_param/valueProcess.js        | 12 -----
 entity/Person_entity/Person_entity.aod        | 44 -------------------
 .../valueProcess.js                           |  3 --
 .../children/filtername_param/valueProcess.js |  2 -
 .../recordidtoignore_param/valueProcess.js    |  3 --
 .../resultfields_param/valueProcess.js        |  2 -
 .../valueProcess.js                           |  2 -
 .../sourcecontactid_param/valueProcess.js     |  3 --
 .../targetcontext_param/valueProcess.js       |  2 -
 .../targetentity_param/valueProcess.js        |  2 -
 .../valuestoscan_param/valueProcess.js        | 16 -------
 21 files changed, 2 insertions(+), 143 deletions(-)
 rename entity/DuplicateScannerPrefilterConfig_entity/entityfields/{condition => filter_condition}/onValueChange.js (100%)
 rename entity/DuplicateScannerPrefilterConfig_entity/entityfields/{condition => filter_condition}/valueProcess.js (100%)
 delete mode 100644 entity/Organisation_entity/entityfields/organisationduplicates/children/filtername_param/valueProcess.js
 delete mode 100644 entity/Organisation_entity/entityfields/organisationduplicates/children/recordidtoignore_param/valueProcess.js
 delete mode 100644 entity/Organisation_entity/entityfields/organisationduplicates/children/resultfields_param/valueProcess.js
 delete mode 100644 entity/Organisation_entity/entityfields/organisationduplicates/children/resultfieldsidfieldname_param/valueProcess.js
 delete mode 100644 entity/Organisation_entity/entityfields/organisationduplicates/children/targetcontext_param/valueProcess.js
 delete mode 100644 entity/Organisation_entity/entityfields/organisationduplicates/children/targetentity_param/valueProcess.js
 delete mode 100644 entity/Organisation_entity/entityfields/organisationduplicates/children/valuestoscan_param/valueProcess.js
 delete mode 100644 entity/Person_entity/entityfields/personduplicates/children/contactidtocheckforcachedduplicates_param/valueProcess.js
 delete mode 100644 entity/Person_entity/entityfields/personduplicates/children/filtername_param/valueProcess.js
 delete mode 100644 entity/Person_entity/entityfields/personduplicates/children/recordidtoignore_param/valueProcess.js
 delete mode 100644 entity/Person_entity/entityfields/personduplicates/children/resultfields_param/valueProcess.js
 delete mode 100644 entity/Person_entity/entityfields/personduplicates/children/resultfieldsidfieldname_param/valueProcess.js
 delete mode 100644 entity/Person_entity/entityfields/personduplicates/children/sourcecontactid_param/valueProcess.js
 delete mode 100644 entity/Person_entity/entityfields/personduplicates/children/targetcontext_param/valueProcess.js
 delete mode 100644 entity/Person_entity/entityfields/personduplicates/children/targetentity_param/valueProcess.js
 delete mode 100644 entity/Person_entity/entityfields/personduplicates/children/valuestoscan_param/valueProcess.js

diff --git a/entity/DuplicateScannerPrefilterConfig_entity/DuplicateScannerPrefilterConfig_entity.aod b/entity/DuplicateScannerPrefilterConfig_entity/DuplicateScannerPrefilterConfig_entity.aod
index 64b9a1e738..9ee761a592 100644
--- a/entity/DuplicateScannerPrefilterConfig_entity/DuplicateScannerPrefilterConfig_entity.aod
+++ b/entity/DuplicateScannerPrefilterConfig_entity/DuplicateScannerPrefilterConfig_entity.aod
@@ -17,8 +17,8 @@
       <name>FILTER_CONDITION</name>
       <title>Condition</title>
       <contentType>FILTER_TREE</contentType>
-      <valueProcess>%aditoprj%/entity/DuplicateScannerPrefilterConfig_entity/entityfields/condition/valueProcess.js</valueProcess>
-      <onValueChange>%aditoprj%/entity/DuplicateScannerPrefilterConfig_entity/entityfields/condition/onValueChange.js</onValueChange>
+      <valueProcess>%aditoprj%/entity/DuplicateScannerPrefilterConfig_entity/entityfields/filter_condition/valueProcess.js</valueProcess>
+      <onValueChange>%aditoprj%/entity/DuplicateScannerPrefilterConfig_entity/entityfields/filter_condition/onValueChange.js</onValueChange>
       <onValueChangeTypes>
         <element>MASK</element>
         <element>PROCESS</element>
diff --git a/entity/DuplicateScannerPrefilterConfig_entity/entityfields/condition/onValueChange.js b/entity/DuplicateScannerPrefilterConfig_entity/entityfields/filter_condition/onValueChange.js
similarity index 100%
rename from entity/DuplicateScannerPrefilterConfig_entity/entityfields/condition/onValueChange.js
rename to entity/DuplicateScannerPrefilterConfig_entity/entityfields/filter_condition/onValueChange.js
diff --git a/entity/DuplicateScannerPrefilterConfig_entity/entityfields/condition/valueProcess.js b/entity/DuplicateScannerPrefilterConfig_entity/entityfields/filter_condition/valueProcess.js
similarity index 100%
rename from entity/DuplicateScannerPrefilterConfig_entity/entityfields/condition/valueProcess.js
rename to entity/DuplicateScannerPrefilterConfig_entity/entityfields/filter_condition/valueProcess.js
diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod
index fa429536f9..506cb431b6 100644
--- a/entity/Organisation_entity/Organisation_entity.aod
+++ b/entity/Organisation_entity/Organisation_entity.aod
@@ -910,42 +910,6 @@
       <iconId>VAADIN:CURLY_BRACKETS</iconId>
       <stateProcess>%aditoprj%/entity/Organisation_entity/entityfields/openadminview/stateProcess.js</stateProcess>
     </entityActionField>
-    <entityConsumer>
-      <name>OrganisationDuplicates</name>
-      <dependency>
-        <name>dependency</name>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>filterName_param</name>
-          <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/organisationduplicates/children/filtername_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>recordIdToIgnore_param</name>
-          <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/organisationduplicates/children/recordidtoignore_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>resultFields_param</name>
-          <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/organisationduplicates/children/resultfields_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>resultFieldsIdFieldName_param</name>
-          <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/organisationduplicates/children/resultfieldsidfieldname_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>targetEntity_param</name>
-          <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/organisationduplicates/children/targetentity_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>valuesToScan_param</name>
-          <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/organisationduplicates/children/valuestoscan_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>targetContext_param</name>
-          <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/organisationduplicates/children/targetcontext_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
     <entityProvider>
       <name>SelfDuplicatesProvider</name>
       <titlePlural>Duplicates</titlePlural>
diff --git a/entity/Organisation_entity/entityfields/organisationduplicates/children/filtername_param/valueProcess.js b/entity/Organisation_entity/entityfields/organisationduplicates/children/filtername_param/valueProcess.js
deleted file mode 100644
index 517d55822d..0000000000
--- a/entity/Organisation_entity/entityfields/organisationduplicates/children/filtername_param/valueProcess.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import("system.result");
-result.string("OrganisationDuplicates");
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/organisationduplicates/children/recordidtoignore_param/valueProcess.js b/entity/Organisation_entity/entityfields/organisationduplicates/children/recordidtoignore_param/valueProcess.js
deleted file mode 100644
index 68a0694645..0000000000
--- a/entity/Organisation_entity/entityfields/organisationduplicates/children/recordidtoignore_param/valueProcess.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import("system.vars");
-import("system.result");
-result.string(vars.get("$field.ORGANISATIONID"));
diff --git a/entity/Organisation_entity/entityfields/organisationduplicates/children/resultfields_param/valueProcess.js b/entity/Organisation_entity/entityfields/organisationduplicates/children/resultfields_param/valueProcess.js
deleted file mode 100644
index daed36607e..0000000000
--- a/entity/Organisation_entity/entityfields/organisationduplicates/children/resultfields_param/valueProcess.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import("system.result");
-
-result.string(JSON.stringify(["NAME", "STANDARD_PHONE_COMMUNICATION", "STANDARD_EMAIL_COMMUNICATION", "ORGANISATIONID"]));
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/organisationduplicates/children/resultfieldsidfieldname_param/valueProcess.js b/entity/Organisation_entity/entityfields/organisationduplicates/children/resultfieldsidfieldname_param/valueProcess.js
deleted file mode 100644
index d3bd35e201..0000000000
--- a/entity/Organisation_entity/entityfields/organisationduplicates/children/resultfieldsidfieldname_param/valueProcess.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import("system.result");
-result.string("ORGANISATIONID");
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/organisationduplicates/children/targetcontext_param/valueProcess.js b/entity/Organisation_entity/entityfields/organisationduplicates/children/targetcontext_param/valueProcess.js
deleted file mode 100644
index 6be9b7dc0b..0000000000
--- a/entity/Organisation_entity/entityfields/organisationduplicates/children/targetcontext_param/valueProcess.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import("system.result");
-result.string("Organisation");
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/organisationduplicates/children/targetentity_param/valueProcess.js b/entity/Organisation_entity/entityfields/organisationduplicates/children/targetentity_param/valueProcess.js
deleted file mode 100644
index e781fb72fd..0000000000
--- a/entity/Organisation_entity/entityfields/organisationduplicates/children/targetentity_param/valueProcess.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import("system.result");
-result.string("Organisation_entity");
\ No newline at end of file
diff --git a/entity/Organisation_entity/entityfields/organisationduplicates/children/valuestoscan_param/valueProcess.js b/entity/Organisation_entity/entityfields/organisationduplicates/children/valuestoscan_param/valueProcess.js
deleted file mode 100644
index afaaa47d8a..0000000000
--- a/entity/Organisation_entity/entityfields/organisationduplicates/children/valuestoscan_param/valueProcess.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import("system.logging");
-import("system.result");
-import("system.vars");
-
-var picture = vars.get("$field.PICTURE");
-var name = vars.get("$field.NAME");
-let status = vars.get("$field.STATUS");
-let recordId = vars.get("$field.ORGANISATIONID");
-
-logging.log("picture -> " + picture);
-
-result.object({PICTURE: picture, NAME: name, STATUS: status, ORGANISATIONID: recordId});
\ No newline at end of file
diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod
index ae9e3b679e..f2b9b93fcd 100644
--- a/entity/Person_entity/Person_entity.aod
+++ b/entity/Person_entity/Person_entity.aod
@@ -987,50 +987,6 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
       <iconId>VAADIN:CURLY_BRACKETS</iconId>
       <stateProcess>%aditoprj%/entity/Person_entity/entityfields/openadminview/stateProcess.js</stateProcess>
     </entityActionField>
-    <entityConsumer>
-      <name>PersonDuplicates</name>
-      <dependency>
-        <name>dependency</name>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>targetEntity_param</name>
-          <valueProcess>%aditoprj%/entity/Person_entity/entityfields/personduplicates/children/targetentity_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>filterName_param</name>
-          <valueProcess>%aditoprj%/entity/Person_entity/entityfields/personduplicates/children/filtername_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>resultFields_param</name>
-          <valueProcess>%aditoprj%/entity/Person_entity/entityfields/personduplicates/children/resultfields_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>valuesToScan_param</name>
-          <valueProcess>%aditoprj%/entity/Person_entity/entityfields/personduplicates/children/valuestoscan_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>resultFieldsIdFieldName_param</name>
-          <valueProcess>%aditoprj%/entity/Person_entity/entityfields/personduplicates/children/resultfieldsidfieldname_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>recordIdToIgnore_param</name>
-          <valueProcess>%aditoprj%/entity/Person_entity/entityfields/personduplicates/children/recordidtoignore_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>targetContext_param</name>
-          <valueProcess>%aditoprj%/entity/Person_entity/entityfields/personduplicates/children/targetcontext_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>sourceContactId_param</name>
-          <valueProcess>%aditoprj%/entity/Person_entity/entityfields/personduplicates/children/sourcecontactid_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>contactIdToCheckForCachedDuplicates_param</name>
-          <valueProcess>%aditoprj%/entity/Person_entity/entityfields/personduplicates/children/contactidtocheckforcachedduplicates_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
     <entityParameter>
       <name>OnlyShowContactIds_param</name>
       <expose v="true" />
diff --git a/entity/Person_entity/entityfields/personduplicates/children/contactidtocheckforcachedduplicates_param/valueProcess.js b/entity/Person_entity/entityfields/personduplicates/children/contactidtocheckforcachedduplicates_param/valueProcess.js
deleted file mode 100644
index 821415ae69..0000000000
--- a/entity/Person_entity/entityfields/personduplicates/children/contactidtocheckforcachedduplicates_param/valueProcess.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import("system.vars");
-import("system.result");
-result.string(vars.get("$field.CONTACTID"));
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/personduplicates/children/filtername_param/valueProcess.js b/entity/Person_entity/entityfields/personduplicates/children/filtername_param/valueProcess.js
deleted file mode 100644
index cd2178222d..0000000000
--- a/entity/Person_entity/entityfields/personduplicates/children/filtername_param/valueProcess.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import("system.result");
-result.string("PersonDuplicates");
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/personduplicates/children/recordidtoignore_param/valueProcess.js b/entity/Person_entity/entityfields/personduplicates/children/recordidtoignore_param/valueProcess.js
deleted file mode 100644
index 821415ae69..0000000000
--- a/entity/Person_entity/entityfields/personduplicates/children/recordidtoignore_param/valueProcess.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import("system.vars");
-import("system.result");
-result.string(vars.get("$field.CONTACTID"));
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/personduplicates/children/resultfields_param/valueProcess.js b/entity/Person_entity/entityfields/personduplicates/children/resultfields_param/valueProcess.js
deleted file mode 100644
index 4b05025f1c..0000000000
--- a/entity/Person_entity/entityfields/personduplicates/children/resultfields_param/valueProcess.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import("system.result");
-result.string(JSON.stringify(["FIRSTNAME", "LASTNAME", "CONTACTID"]));
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/personduplicates/children/resultfieldsidfieldname_param/valueProcess.js b/entity/Person_entity/entityfields/personduplicates/children/resultfieldsidfieldname_param/valueProcess.js
deleted file mode 100644
index 364d243874..0000000000
--- a/entity/Person_entity/entityfields/personduplicates/children/resultfieldsidfieldname_param/valueProcess.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import("system.result");
-result.string("CONTACTID");
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/personduplicates/children/sourcecontactid_param/valueProcess.js b/entity/Person_entity/entityfields/personduplicates/children/sourcecontactid_param/valueProcess.js
deleted file mode 100644
index 821415ae69..0000000000
--- a/entity/Person_entity/entityfields/personduplicates/children/sourcecontactid_param/valueProcess.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import("system.vars");
-import("system.result");
-result.string(vars.get("$field.CONTACTID"));
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/personduplicates/children/targetcontext_param/valueProcess.js b/entity/Person_entity/entityfields/personduplicates/children/targetcontext_param/valueProcess.js
deleted file mode 100644
index 8fccd9a7e2..0000000000
--- a/entity/Person_entity/entityfields/personduplicates/children/targetcontext_param/valueProcess.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import("system.result");
-result.string("Person");
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/personduplicates/children/targetentity_param/valueProcess.js b/entity/Person_entity/entityfields/personduplicates/children/targetentity_param/valueProcess.js
deleted file mode 100644
index 0f7bee25ea..0000000000
--- a/entity/Person_entity/entityfields/personduplicates/children/targetentity_param/valueProcess.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import("system.result");
-result.string("Person_entity");
\ No newline at end of file
diff --git a/entity/Person_entity/entityfields/personduplicates/children/valuestoscan_param/valueProcess.js b/entity/Person_entity/entityfields/personduplicates/children/valuestoscan_param/valueProcess.js
deleted file mode 100644
index 8e2ffcbd39..0000000000
--- a/entity/Person_entity/entityfields/personduplicates/children/valuestoscan_param/valueProcess.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import("system.logging");
-import("system.result");
-import("system.vars");
-
-/*
- * All values to the configured filters have to be defined here.
- * The same field as defined in resultFieldsIdFieldName and the respective id have to be included in the values list.
- * It has to be the correct id of the target entity, which is also used to open the preview.
- */
-var firstname = vars.get("$field.FIRSTNAME");
-var lastname = vars.get("$field.LASTNAME");
-let gender = vars.get("$field.GENDER");
-let recordId = vars.get("$field.CONTACTID");
-
-
-result.object({FIRSTNAME: firstname, LASTNAME: lastname, GENDER: gender, CONTACTID: recordId});
\ No newline at end of file
-- 
GitLab