From a72cbac9dfc6731c583ccea1a55ee34ebdac585f Mon Sep 17 00:00:00 2001
From: Pascal Neub <p.neub@adito.de>
Date: Tue, 13 Apr 2021 06:05:42 +0000
Subject: [PATCH] 2021.0 1075641 checklistfix

---
 .../Checklists/change_phase_translation.xml   | 28 +++++++++++++++++++
 .../basic/2021.0.3/Checklists/changelog.xml   |  1 +
 .../generatedData/checklistentry.xml          |  2 +-
 .../_____LANGUAGE_EXTRA.aod                   |  9 ++++++
 .../_____LANGUAGE_de/_____LANGUAGE_de.aod     | 12 ++++++++
 .../_____LANGUAGE_en/_____LANGUAGE_en.aod     | 12 ++++++++
 .../ChecklistEntryRegistry_basic/process.js   |  5 ++--
 7 files changed, 65 insertions(+), 4 deletions(-)
 create mode 100644 .liquibase/Data_alias/basic/2021.0.3/Checklists/change_phase_translation.xml

diff --git a/.liquibase/Data_alias/basic/2021.0.3/Checklists/change_phase_translation.xml b/.liquibase/Data_alias/basic/2021.0.3/Checklists/change_phase_translation.xml
new file mode 100644
index 0000000000..bf63198c48
--- /dev/null
+++ b/.liquibase/Data_alias/basic/2021.0.3/Checklists/change_phase_translation.xml
@@ -0,0 +1,28 @@
+<?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="p.neub" id="79f72a80-0830-4185-a9cd-bb51b3d0c432">
+        <update tableName="AB_KEYWORD_ENTRY">
+            <column name="TITLE" value="${SALESPROJECT_PROSPECT}"/>
+            <where>AB_KEYWORD_ENTRYID = ?</where>
+            <whereParams>
+                <param value="8aa5d8bb-b412-4c88-b27a-a26d89881bf3"/>
+            </whereParams>
+        </update>
+        <update tableName="AB_KEYWORD_ENTRY">
+            <column name="TITLE" value="${SALESPROJECT_LEAD}"/>
+            <where>AB_KEYWORD_ENTRYID = ?</where>
+            <whereParams>
+                <param value="98f46a57-a27d-4394-990a-c13513bbea3b"/>
+            </whereParams>
+        </update>
+        <update tableName="AB_KEYWORD_ENTRY">
+            <column name="TITLE" value="${SALESPROJECT_CONTACT}"/>
+            <where>AB_KEYWORD_ENTRYID = ?</where>
+            <whereParams>
+                <param value="bc24b535-a226-47a3-b43d-bd739f8c9237"/>
+            </whereParams>
+        </update>
+    </changeSet>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/.liquibase/Data_alias/basic/2021.0.3/Checklists/changelog.xml b/.liquibase/Data_alias/basic/2021.0.3/Checklists/changelog.xml
index 577da62148..15bb01b42a 100644
--- a/.liquibase/Data_alias/basic/2021.0.3/Checklists/changelog.xml
+++ b/.liquibase/Data_alias/basic/2021.0.3/Checklists/changelog.xml
@@ -7,4 +7,5 @@
     <include relativeToChangelogFile="true" file="update_salesproject.xml"/>
     <include relativeToChangelogFile="true" file="update_keyword.xml"/>
     <include relativeToChangelogFile="true" file="update_ab_attributeusage_salesprojectorigin.xml"/>
+    <include relativeToChangelogFile="true" file="change_phase_translation.xml"/>
 </databaseChangeLog>
\ No newline at end of file
diff --git a/.liquibase/Data_alias/basic/_demoData/generatedData/checklistentry.xml b/.liquibase/Data_alias/basic/_demoData/generatedData/checklistentry.xml
index 6184351538..2920277bd6 100644
--- a/.liquibase/Data_alias/basic/_demoData/generatedData/checklistentry.xml
+++ b/.liquibase/Data_alias/basic/_demoData/generatedData/checklistentry.xml
@@ -62,7 +62,7 @@
             <column name="DATE_EDIT"/>
             <column name="USER_EDIT"/>
             <column name="CHECKLISTENTRYID" value="2dc42fbb-4e0b-498f-8032-0c5451bea157"/>
-            <column name="TITLE" value="salesprojectTeamRoles"/>
+            <column name="TITLE" value="salesprojectRoleProjectteam"/>
             <column name="USER_NEW" value="Admin"/>
             <column name="DATE_NEW"/>
         </insert>
diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
index f8a0d9c47b..7a23534af0 100644
--- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
+++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
@@ -8412,6 +8412,15 @@
     <entry>
       <key>On site</key>
     </entry>
+    <entry>
+      <key>${SALESPROJECT_PROSPECT}</key>
+    </entry>
+    <entry>
+      <key>${SALESPROJECT_LEAD}</key>
+    </entry>
+    <entry>
+      <key>${SALESPROJECT_CONTACT}</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 87bd4e645b..a0af84c151 100644
--- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
+++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
@@ -10917,6 +10917,18 @@ Bitte Datumseingabe prüfen</value>
       <key>There already exists a %0 price with the same type of pricelist, quantity and currency in the defined range.</key>
       <value>Es gibt bereits einen %0 Preis mit der selben Preisliste, Menge und Einheit im festgeleten Bereich.</value>
     </entry>
+    <entry>
+      <key>${SALESPROJECT_PROSPECT}</key>
+      <value>Prospect</value>
+    </entry>
+    <entry>
+      <key>${SALESPROJECT_LEAD}</key>
+      <value>Lead</value>
+    </entry>
+    <entry>
+      <key>${SALESPROJECT_CONTACT}</key>
+      <value>Contact</value>
+    </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 cc77285492..bdbd5793b3 100644
--- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
+++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
@@ -8421,6 +8421,18 @@
     <entry>
       <key>Vacation</key>
     </entry>
+    <entry>
+      <key>${SALESPROJECT_PROSPECT}</key>
+      <value>Prospect</value>
+    </entry>
+    <entry>
+      <key>${SALESPROJECT_LEAD}</key>
+      <value>Lead</value>
+    </entry>
+    <entry>
+      <key>${SALESPROJECT_CONTACT}</key>
+      <value>Contact</value>
+    </entry>
   </keyValueMap>
   <font name="Dialog" style="0" size="11" />
 </language>
diff --git a/process/ChecklistEntryRegistry_basic/process.js b/process/ChecklistEntryRegistry_basic/process.js
index c8cf45cba5..50d9385590 100644
--- a/process/ChecklistEntryRegistry_basic/process.js
+++ b/process/ChecklistEntryRegistry_basic/process.js
@@ -1,6 +1,5 @@
 import("Attribute_lib");
 import("Keyword_lib");
-import("system.logging");
 import("system.eMath");
 import("system.datetime");
 import("system.translate");
@@ -422,6 +421,7 @@ $ChecklistEntryRegistry.salesprojectRoleProjectteam = function(){
             var memberRows = $ChecklistEntryRegistry._getRows(null, "Member_entity", ["MEMBERROLE"], [["EnableMSTeams_param", spRows[0]["MST_TEAM_ID"]], 
                                                                     ["ObjectRowId_param", spRows[0]["SALESPROJECTID"]]], "WithDistrictResponsibles");
             var roles = ["MEMROLEINITIATOR", "MEMROLEDECISIONMAKER", "MEMROLEADVISE", "MEMROLEUSER", "MEMROLEEXSALEMANAG"];
+            
             for (let i = 0; i < memberRows.length; i++) 
             {
                 var role = memberRows[i]["MEMBERROLE"];
@@ -497,8 +497,7 @@ $ChecklistEntryRegistry.salesprojectFirstCustConv = function(){
             ], SqlBuilder.IN());
             
             var activityCount = newSelect("count(*)").from("ACTIVITYLINK")
-            .where("ACTIVITYLINK.ACTIVITY_ID", activitiesSubSql, SqlBuilder.IN())
-            .and("ACTIVITYLINK.OBJECT_TYPE", ["Person", "PrivatePerson"], SqlBuilder.IN());
+            .where("ACTIVITYLINK.ACTIVITY_ID", activitiesSubSql, SqlBuilder.IN());
             return parseInt(activityCount.cell()) > 0;
         }
     };
-- 
GitLab