From 690e04e4ae13acfba04186c2aaa14197ce6bd0ca Mon Sep 17 00:00:00 2001
From: Sebastian Listl <s.listl@adito.de>
Date: Fri, 3 Dec 2021 18:00:15 +0100
Subject: [PATCH] Scan services fixed file links

---
 .../children/blacklist_param/valueProcess.js   |  3 ---
 .../invertblacklist_param/valueProcess.js      |  3 ---
 .../openhtmleditor/onActionProcess.js          |  8 --------
 .../openhtmleditor/stateProcess.js             | 18 ------------------
 .../ExportTemplateField_entity.aod             |  1 -
 .../documentation.adoc                         |  9 ---------
 .../InterestLink_entity.aod                    |  2 --
 .../net_discount.value/expression.js           |  3 ---
 .../newsupportticket/onActionProcess.js        |  5 -----
 entity/Person_entity/Person_entity.aod         |  1 -
 entity/Product_entity/Product_entity.aod       |  1 -
 entity/QuickEntry_entity/QuickEntry_entity.aod |  4 ++--
 .../valueProcess.js                            |  0
 .../children/returnempty_param/valueProcess.js |  3 +--
 .../children/returnempty_param/valueProcess.js |  4 ----
 .../valueProcess.js                            |  4 ----
 .../children/actionname/valueProcess.js        |  4 ----
 entity/Weblink_entity/Weblink_entity.aod       |  2 +-
 .../userlastchange.value/expression.js         |  6 ++++++
 .../userlstchange.value/expression.js          |  6 ------
 .../QuickEntryEdit_view.aod                    |  2 +-
 21 files changed, 11 insertions(+), 78 deletions(-)
 delete mode 100644 entity/Context_entity/entityfields/salesorderlinkeablet/children/blacklist_param/valueProcess.js
 delete mode 100644 entity/Context_entity/entityfields/salesorderlinkeablet/children/invertblacklist_param/valueProcess.js
 delete mode 100644 entity/DocumentTemplate_entity/entityfields/openhtmleditor/onActionProcess.js
 delete mode 100644 entity/DocumentTemplate_entity/entityfields/openhtmleditor/stateProcess.js
 delete mode 100644 entity/ExportTemplate_entity/entityfields/exporttemplatefields/children/exporttemplatefield_param/documentation.adoc
 delete mode 100644 entity/Offer_entity/recordcontainers/db/recordfieldmappings/net_discount.value/expression.js
 delete mode 100644 entity/Organisation_entity/entityfields/newsupportticket/onActionProcess.js
 rename entity/QuickEntry_entity/entityfields/communications/children/{contactid_param => objectrowid_param}/valueProcess.js (100%)
 delete mode 100644 entity/QuickEntry_entity/entityfields/supporttickets/children/returnempty_param/valueProcess.js
 delete mode 100644 entity/QuickEntry_entity/entityfields/supporttickets/children/taskrequestorcontactid_param/valueProcess.js
 delete mode 100644 entity/ServiceEmail_entity/entityfields/recipients_tolooku/children/actionname/valueProcess.js
 create mode 100644 entity/Weblink_entity/recordcontainers/db/recordfieldmappings/userlastchange.value/expression.js
 delete mode 100644 entity/Weblink_entity/recordcontainers/db/recordfieldmappings/userlstchange.value/expression.js

diff --git a/entity/Context_entity/entityfields/salesorderlinkeablet/children/blacklist_param/valueProcess.js b/entity/Context_entity/entityfields/salesorderlinkeablet/children/blacklist_param/valueProcess.js
deleted file mode 100644
index 1322527cbb..0000000000
--- a/entity/Context_entity/entityfields/salesorderlinkeablet/children/blacklist_param/valueProcess.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import("system.result");
-
-result.object(["Salesproject", "Salesorder"]);
\ No newline at end of file
diff --git a/entity/Context_entity/entityfields/salesorderlinkeablet/children/invertblacklist_param/valueProcess.js b/entity/Context_entity/entityfields/salesorderlinkeablet/children/invertblacklist_param/valueProcess.js
deleted file mode 100644
index 40effa0178..0000000000
--- a/entity/Context_entity/entityfields/salesorderlinkeablet/children/invertblacklist_param/valueProcess.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import("system.result");
-
-result.string(true);
\ No newline at end of file
diff --git a/entity/DocumentTemplate_entity/entityfields/openhtmleditor/onActionProcess.js b/entity/DocumentTemplate_entity/entityfields/openhtmleditor/onActionProcess.js
deleted file mode 100644
index 95bb87fdb7..0000000000
--- a/entity/DocumentTemplate_entity/entityfields/openhtmleditor/onActionProcess.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import("system.neonFilter");
-import("system.logging");
-import("system.vars");
-import("DocumentTemplate_lib");
-import("system.neon");
-
-var recipe = neonFilter.createEntityRecordsRecipeBuilder().uidsIncludelist([vars.get("$field.DOCUMENTTEMPLATEID")]).toString();
-neon.openContextWithRecipe("DocumentTemplate", "DocumentTemplateHtmlEdit_view", recipe, neon.OPERATINGSTATE_EDIT);
diff --git a/entity/DocumentTemplate_entity/entityfields/openhtmleditor/stateProcess.js b/entity/DocumentTemplate_entity/entityfields/openhtmleditor/stateProcess.js
deleted file mode 100644
index 718a961090..0000000000
--- a/entity/DocumentTemplate_entity/entityfields/openhtmleditor/stateProcess.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import("KeywordRegistry_basic");
-import("system.result");
-import("system.vars");
-import("DocumentTemplate_lib");
-import("system.neon");
-
-var template = DocumentTemplateUtils.getTemplate(vars.get("$field.DOCUMENTTEMPLATEID"), false);
-var kind = vars.get("$field.KIND");
-
-if (template)
-{
-    if(template.type == DocumentTemplate.types.HTML && 
-        kind == $KeywordRegistry.documentTemplateType$textModular() || 
-        kind == $KeywordRegistry.documentTemplateType$mail())
-    {
-        result.string(neon.COMPONENTSTATE_EDITABLE);
-    }
-}
diff --git a/entity/ExportTemplateField_entity/ExportTemplateField_entity.aod b/entity/ExportTemplateField_entity/ExportTemplateField_entity.aod
index 657050d20e..0b07d9c4f2 100644
--- a/entity/ExportTemplateField_entity/ExportTemplateField_entity.aod
+++ b/entity/ExportTemplateField_entity/ExportTemplateField_entity.aod
@@ -97,7 +97,6 @@
       <title>Place of Use</title>
       <consumer>ExportTemplatePlacesOfUse</consumer>
       <mandatory v="true" />
-      <onValueChange>%aditoprj%/entity/ExportTemplateField_entity/entityfields/exporttemplateplaceofuse_id/onValueChange.js</onValueChange>
     </entityField>
     <entityField>
       <name>placeOfUse</name>
diff --git a/entity/ExportTemplate_entity/entityfields/exporttemplatefields/children/exporttemplatefield_param/documentation.adoc b/entity/ExportTemplate_entity/entityfields/exporttemplatefields/children/exporttemplatefield_param/documentation.adoc
deleted file mode 100644
index 7ff3082082..0000000000
--- a/entity/ExportTemplate_entity/entityfields/exporttemplatefields/children/exporttemplatefield_param/documentation.adoc
+++ /dev/null
@@ -1,9 +0,0 @@
-= ExportTemplate_entity
-
-Entity to store all the ExportTemplates.
-Exporttemplates are used to give the user an easy way to export Data from an table.
-
-linked via the ExportTemplateId to: 
--ExportTemplateField_entity to make it possible to store multiple fields for one template
--ExportTemplatePlaceOfUse_entity to make it possible to store multiple places of usage for one template
--ExportTemplateSelection_entity entity for the selection of the template
\ No newline at end of file
diff --git a/entity/InterestLink_entity/InterestLink_entity.aod b/entity/InterestLink_entity/InterestLink_entity.aod
index 1ac1a55774..c77a7c8549 100644
--- a/entity/InterestLink_entity/InterestLink_entity.aod
+++ b/entity/InterestLink_entity/InterestLink_entity.aod
@@ -123,12 +123,10 @@
         <dbRecordFieldMapping>
           <name>INTEREST_ID.value</name>
           <recordfield>INTERESTLINK.INTEREST_ID</recordfield>
-          <expression>%aditoprj%/entity/InterestLink_entity/recordcontainers/db/recordfieldmappings/interest_id.value/expression.js</expression>
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>INTERESTLINKID.value</name>
           <recordfield>INTERESTLINK.INTERESTLINKID</recordfield>
-          <expression>%aditoprj%/entity/InterestLink_entity/recordcontainers/db/recordfieldmappings/interestlinkid.value/expression.js</expression>
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>STATUS.value</name>
diff --git a/entity/Offer_entity/recordcontainers/db/recordfieldmappings/net_discount.value/expression.js b/entity/Offer_entity/recordcontainers/db/recordfieldmappings/net_discount.value/expression.js
deleted file mode 100644
index bcb815fcaa..0000000000
--- a/entity/Offer_entity/recordcontainers/db/recordfieldmappings/net_discount.value/expression.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import("system.result");
-
-result.string("OFFER.NET * OFFER.DISCOUNT / 100");
diff --git a/entity/Organisation_entity/entityfields/newsupportticket/onActionProcess.js b/entity/Organisation_entity/entityfields/newsupportticket/onActionProcess.js
deleted file mode 100644
index 17dc629c23..0000000000
--- a/entity/Organisation_entity/entityfields/newsupportticket/onActionProcess.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import("system.vars");
-import("Ticket_lib");
-
-
-TicketUtils.openNewSupportticketWithLinks( [["Organisation", vars.get( "$field.CONTACTID")]]);
\ No newline at end of file
diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod
index faf9f0c2fb..482f939243 100644
--- a/entity/Person_entity/Person_entity.aod
+++ b/entity/Person_entity/Person_entity.aod
@@ -405,7 +405,6 @@
       <name>STANDARD_PHONE_COMMUNICATION</name>
       <title>Phone</title>
       <consumer>PhoneCommunications</consumer>
-      <displayValueProcess>%aditoprj%/entity/Person_entity/entityfields/standard_phone_communication/displayValueProcess.js</displayValueProcess>
       <onValueChange>%aditoprj%/entity/Person_entity/entityfields/standard_phone_communication/onValueChange.js</onValueChange>
     </entityField>
     <entityConsumer>
diff --git a/entity/Product_entity/Product_entity.aod b/entity/Product_entity/Product_entity.aod
index bf2d0e8493..3ecb7cb6b0 100644
--- a/entity/Product_entity/Product_entity.aod
+++ b/entity/Product_entity/Product_entity.aod
@@ -693,7 +693,6 @@
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>STATUS_TILEVIEW.displayValue</name>
-          <expression>%aditoprj%/entity/Product_entity/recordcontainers/db/recordfieldmappings/statustileview.displayvalue/expression.js</expression>
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>ADVERTISING_TILEVIEW.value</name>
diff --git a/entity/QuickEntry_entity/QuickEntry_entity.aod b/entity/QuickEntry_entity/QuickEntry_entity.aod
index 0db66c9d52..a081ee4d02 100644
--- a/entity/QuickEntry_entity/QuickEntry_entity.aod
+++ b/entity/QuickEntry_entity/QuickEntry_entity.aod
@@ -32,7 +32,7 @@
       <children>
         <entityParameter>
           <name>ObjectRowId_param</name>
-          <valueProcess>%aditoprj%/entity/QuickEntry_entity/entityfields/communications/children/contactid_param/valueProcess.js</valueProcess>
+          <valueProcess>%aditoprj%/entity/QuickEntry_entity/entityfields/communications/children/objectrowid_param/valueProcess.js</valueProcess>
         </entityParameter>
         <entityParameter>
           <name>ObjectType_param</name>
@@ -233,7 +233,7 @@
       <documentation>%aditoprj%/entity/QuickEntry_entity/entityfields/personcontactids_param/documentation.adoc</documentation>
     </entityParameter>
     <entityConsumer>
-      <name>Service tickets</name>
+      <name>ServiceTickets</name>
       <dependency>
         <name>dependency</name>
         <entityName>SupportTicket_entity</entityName>
diff --git a/entity/QuickEntry_entity/entityfields/communications/children/contactid_param/valueProcess.js b/entity/QuickEntry_entity/entityfields/communications/children/objectrowid_param/valueProcess.js
similarity index 100%
rename from entity/QuickEntry_entity/entityfields/communications/children/contactid_param/valueProcess.js
rename to entity/QuickEntry_entity/entityfields/communications/children/objectrowid_param/valueProcess.js
diff --git a/entity/QuickEntry_entity/entityfields/servicetickets/children/returnempty_param/valueProcess.js b/entity/QuickEntry_entity/entityfields/servicetickets/children/returnempty_param/valueProcess.js
index dc28dd1668..e0f3ec47e2 100644
--- a/entity/QuickEntry_entity/entityfields/servicetickets/children/returnempty_param/valueProcess.js
+++ b/entity/QuickEntry_entity/entityfields/servicetickets/children/returnempty_param/valueProcess.js
@@ -1,4 +1,3 @@
 import("system.result");
 
-
-result.string( false);
\ No newline at end of file
+result.string(false);
\ No newline at end of file
diff --git a/entity/QuickEntry_entity/entityfields/supporttickets/children/returnempty_param/valueProcess.js b/entity/QuickEntry_entity/entityfields/supporttickets/children/returnempty_param/valueProcess.js
deleted file mode 100644
index b691020ed6..0000000000
--- a/entity/QuickEntry_entity/entityfields/supporttickets/children/returnempty_param/valueProcess.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import("system.result");
-
-
-result.string( true);
\ No newline at end of file
diff --git a/entity/QuickEntry_entity/entityfields/supporttickets/children/taskrequestorcontactid_param/valueProcess.js b/entity/QuickEntry_entity/entityfields/supporttickets/children/taskrequestorcontactid_param/valueProcess.js
deleted file mode 100644
index 16c85500b5..0000000000
--- a/entity/QuickEntry_entity/entityfields/supporttickets/children/taskrequestorcontactid_param/valueProcess.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import("system.vars");
-import("system.result");
-
-result.string(vars.get("$field.UID"));
\ No newline at end of file
diff --git a/entity/ServiceEmail_entity/entityfields/recipients_tolooku/children/actionname/valueProcess.js b/entity/ServiceEmail_entity/entityfields/recipients_tolooku/children/actionname/valueProcess.js
deleted file mode 100644
index b1c1aeb894..0000000000
--- a/entity/ServiceEmail_entity/entityfields/recipients_tolooku/children/actionname/valueProcess.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import("system.vars");
-import("system.result");
-
-result.string( vars.get( "$param.ActionName_param"));
\ No newline at end of file
diff --git a/entity/Weblink_entity/Weblink_entity.aod b/entity/Weblink_entity/Weblink_entity.aod
index b36de13a6f..e263ae195e 100644
--- a/entity/Weblink_entity/Weblink_entity.aod
+++ b/entity/Weblink_entity/Weblink_entity.aod
@@ -318,7 +318,7 @@
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>userLastChange.value</name>
-          <expression>%aditoprj%/entity/Weblink_entity/recordcontainers/db/recordfieldmappings/userlstchange.value/expression.js</expression>
+          <expression>%aditoprj%/entity/Weblink_entity/recordcontainers/db/recordfieldmappings/userlastchange.value/expression.js</expression>
           <isFilterable v="true" />
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
diff --git a/entity/Weblink_entity/recordcontainers/db/recordfieldmappings/userlastchange.value/expression.js b/entity/Weblink_entity/recordcontainers/db/recordfieldmappings/userlastchange.value/expression.js
new file mode 100644
index 0000000000..eb2cdf0df2
--- /dev/null
+++ b/entity/Weblink_entity/recordcontainers/db/recordfieldmappings/userlastchange.value/expression.js
@@ -0,0 +1,6 @@
+import("system.result");
+import("Sql_lib");
+
+var cond = new SqlMaskingUtils().isNull("WEBLINK.USER_EDIT", "WEBLINK.USER_NEW");
+
+result.string(cond);
\ No newline at end of file
diff --git a/entity/Weblink_entity/recordcontainers/db/recordfieldmappings/userlstchange.value/expression.js b/entity/Weblink_entity/recordcontainers/db/recordfieldmappings/userlstchange.value/expression.js
deleted file mode 100644
index 6efa7822f9..0000000000
--- a/entity/Weblink_entity/recordcontainers/db/recordfieldmappings/userlstchange.value/expression.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import("system.result");
-import("Sql_lib");
-
-var cond = SqlMaskingUtils.prototype.isNull("WEBLINK.USER_EDIT", "WEBLINK.USER_NEW");
-
-result.string(cond);
\ No newline at end of file
diff --git a/neonView/QuickEntryEdit_view/QuickEntryEdit_view.aod b/neonView/QuickEntryEdit_view/QuickEntryEdit_view.aod
index d1aa285fbc..baf020a9f8 100644
--- a/neonView/QuickEntryEdit_view/QuickEntryEdit_view.aod
+++ b/neonView/QuickEntryEdit_view/QuickEntryEdit_view.aod
@@ -80,7 +80,7 @@
     </neonViewReference>
     <neonViewReference>
       <name>ad2e41fc-e1e3-4907-9d23-7f3e3c4a026b</name>
-      <entityField>Service tickets</entityField>
+      <entityField>ServiceTickets</entityField>
       <view>SupportTicketMultiEdit_view</view>
     </neonViewReference>
   </children>
-- 
GitLab