From 697bf2a23f3a07abf6bae2db1d33c2b87b84d522 Mon Sep 17 00:00:00 2001
From: Johannes Hoermann <j.hoermann@adito.de>
Date: Thu, 22 Nov 2018 11:29:26 +0100
Subject: [PATCH] Salesproject fix titles

---
 entity/History_entity/History_entity.aod      | 10 +++----
 entity/Offer_entity/Offer_entity.aod          | 26 +++++++++---------
 .../SalesprojectCompetition_entity.aod        | 11 ++++----
 .../SalesprojectCycle_entity.aod              |  4 +--
 .../SalesprojectForecast_entity.aod           |  8 +++---
 .../{captionProcess.js => titleProcess.js}    |  0
 .../SalesprojectMember_entity.aod             |  6 +++++
 .../salesproject_role/possibleItemsProcess.js |  8 ++++++
 .../SalesprojectSource_entity.aod             |  6 ++---
 .../Salesproject_entity.aod                   | 27 ++++++++++---------
 10 files changed, 60 insertions(+), 46 deletions(-)
 rename entity/SalesprojectForecast_entity/entityfields/volume/{captionProcess.js => titleProcess.js} (100%)
 create mode 100644 entity/SalesprojectMember_entity/entityfields/salesproject_role/possibleItemsProcess.js

diff --git a/entity/History_entity/History_entity.aod b/entity/History_entity/History_entity.aod
index d87c7f9d74..702d6d4942 100644
--- a/entity/History_entity/History_entity.aod
+++ b/entity/History_entity/History_entity.aod
@@ -15,17 +15,17 @@
   <entityFields>
     <entityField>
       <name>DIRECTION</name>
+      <title>Direction</title>
       <tableName>HISTORY</tableName>
       <columnName>DIRECTION</columnName>
-      <caption>Direction</caption>
       <possibleItemsProcess>%aditoprj%/entity/History_entity/entityfields/direction/possibleItemsProcess.js</possibleItemsProcess>
       <groupable v="true" />
     </entityField>
     <entityField>
       <name>ENTRYDATE</name>
+      <title>Entrydate</title>
       <tableName>HISTORY</tableName>
       <columnName>ENTRYDATE</columnName>
-      <caption>Entrydate</caption>
       <contentType>DATE</contentType>
       <resolution>DAY</resolution>
       <mandatory v="true" />
@@ -38,26 +38,26 @@
     </entityField>
     <entityField>
       <name>INFO</name>
+      <title>Description</title>
       <tableName>HISTORY</tableName>
       <columnName>INFO</columnName>
-      <caption>Description</caption>
       <contentType>HTML</contentType>
       <mandatory v="false" />
     </entityField>
     <entityField>
       <name>MEDIUM</name>
+      <title>Medium</title>
       <tableName>HISTORY</tableName>
       <columnName>MEDIUM</columnName>
-      <caption>Medium</caption>
       <mandatory v="false" />
       <possibleItemsProcess>%aditoprj%/entity/History_entity/entityfields/medium/possibleItemsProcess.js</possibleItemsProcess>
       <groupable v="true" />
     </entityField>
     <entityField>
       <name>SUBJECT</name>
+      <title>Subject</title>
       <tableName>HISTORY</tableName>
       <columnName>SUBJECT</columnName>
-      <caption>Subject</caption>
       <mandatory v="true" />
       <groupable v="true" />
     </entityField>
diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod
index c75d5629ea..cd4fa0c53a 100644
--- a/entity/Offer_entity/Offer_entity.aod
+++ b/entity/Offer_entity/Offer_entity.aod
@@ -15,9 +15,9 @@
     </entityIncomingField>
     <entityField>
       <name>CURRENCY</name>
+      <title>Currency</title>
       <tableName>OFFER</tableName>
       <columnName>CURRENCY</columnName>
-      <caption>Currency</caption>
       <possibleItemsProcess>%aditoprj%/entity/Offer_entity/entityfields/currency/possibleItemsProcess.js</possibleItemsProcess>
     </entityField>
     <entityField>
@@ -37,18 +37,18 @@
     </entityField>
     <entityField>
       <name>OFFERCODE</name>
+      <title>Offer number</title>
       <tableName>OFFER</tableName>
       <columnName>OFFERCODE</columnName>
-      <caption>Offer number</caption>
       <state>READONLY</state>
       <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offercode/valueProcess.js</valueProcess>
       <onValidation>%aditoprj%/entity/Offer_entity/entityfields/offercode/onValidation.js</onValidation>
     </entityField>
     <entityField>
       <name>OFFERDATE</name>
+      <title>Date</title>
       <tableName>OFFER</tableName>
       <columnName>OFFERDATE</columnName>
-      <caption>Date</caption>
       <contentType>DATE</contentType>
       <resolution>DAY</resolution>
       <mandatory v="true" />
@@ -62,30 +62,30 @@
     </entityField>
     <entityField>
       <name>PROBABILITY</name>
+      <title>Probability</title>
       <tableName>OFFER</tableName>
       <columnName>PROBABILITY</columnName>
-      <caption>Probability</caption>
       <possibleItemsProcess>%aditoprj%/entity/Offer_entity/entityfields/probability/possibleItemsProcess.js</possibleItemsProcess>
     </entityField>
     <entityField>
       <name>RELATION_ID</name>
+      <title>Contact / Company</title>
       <tableName>OFFER</tableName>
       <columnName>RELATION_ID</columnName>
-      <caption>Contact / Company</caption>
       <mandatory v="true" />
       <onValueChange>%aditoprj%/entity/Offer_entity/entityfields/relation_id/onValueChange.js</onValueChange>
     </entityField>
     <entityField>
       <name>SALESPROJECT_ID</name>
+      <title>Salesproject</title>
       <tableName>OFFER</tableName>
       <columnName>SALESPROJECT_ID</columnName>
-      <caption>Salesproject</caption>
     </entityField>
     <entityField>
       <name>STATUS</name>
+      <title>Status</title>
       <tableName>OFFER</tableName>
       <columnName>STATUS</columnName>
-      <caption>Status</caption>
       <possibleItemsProcess>%aditoprj%/entity/Offer_entity/entityfields/status/possibleItemsProcess.js</possibleItemsProcess>
     </entityField>
     <entityField>
@@ -102,9 +102,9 @@
     </entityField>
     <entityField>
       <name>VAT</name>
+      <title>Total VAT</title>
       <tableName>OFFER</tableName>
       <columnName>VAT</columnName>
-      <caption>Total VAT</caption>
       <state>READONLY</state>
     </entityField>
     <entityField>
@@ -114,16 +114,16 @@
     </entityField>
     <entityField>
       <name>HEADER</name>
+      <title>Header text</title>
       <tableName>OFFER</tableName>
       <columnName>HEADER</columnName>
-      <caption>Header text</caption>
       <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/header/valueProcess.js</valueProcess>
     </entityField>
     <entityField>
       <name>FOOTER</name>
+      <title>Footer text</title>
       <tableName>OFFER</tableName>
       <columnName>FOOTER</columnName>
-      <caption>Footer text</caption>
     </entityField>
     <entityOutgoingField>
       <name>OfferOfferitem_dfo</name>
@@ -178,16 +178,16 @@
     </entityField>
     <entityField>
       <name>NET</name>
+      <title>Total net</title>
       <tableName>OFFER</tableName>
       <columnName>NET</columnName>
-      <caption>Total net</caption>
       <state>READONLY</state>
       <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/net/valueProcess.js</valueProcess>
       <fieldIdProcess>%aditoprj%/entity/Offer_entity/entityfields/net/fieldIdProcess.js</fieldIdProcess>
     </entityField>
     <entityField>
       <name>TotalGross</name>
-      <caption>Total gross</caption>
+      <title>Total gross</title>
       <state>READONLY</state>
       <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/totalgross/valueProcess.js</valueProcess>
     </entityField>
@@ -212,9 +212,9 @@
     </entityIncomingField>
     <entityField>
       <name>LANGUAGE</name>
+      <title>Language</title>
       <tableName>OFFER</tableName>
       <columnName>LANGUAGE</columnName>
-      <caption>Language</caption>
       <mandatory v="true" />
       <outgoingField></outgoingField>
       <possibleItemsProcess>%aditoprj%/entity/Offer_entity/entityfields/language/possibleItemsProcess.js</possibleItemsProcess>
diff --git a/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod b/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod
index 226378befc..995dfc78f8 100644
--- a/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod
+++ b/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod
@@ -4,7 +4,6 @@
   <title>Competition</title>
   <majorModelMode>DISTRIBUTED</majorModelMode>
   <recordContainerType>DB</recordContainerType>
-  <caption>Competition</caption>
   <alias>Data_alias</alias>
   <conditionProcess>%aditoprj%/entity/SalesprojectCompetition_entity/conditionProcess.js</conditionProcess>
   <entityFields>
@@ -13,9 +12,9 @@
     </entityIncomingField>
     <entityField>
       <name>DATE_CANCELLED</name>
+      <title>Excreted</title>
       <tableName>SALESPROJECT_COMPETITION</tableName>
       <columnName>DATE_CANCELLED</columnName>
-      <caption>Excreted</caption>
       <contentType>DATE</contentType>
       <resolution>DAY</resolution>
     </entityField>
@@ -33,22 +32,22 @@
     </entityField>
     <entityField>
       <name>INFO</name>
+      <title>Info</title>
       <tableName>SALESPROJECT_COMPETITION</tableName>
       <columnName>INFO</columnName>
-      <caption>Info</caption>
     </entityField>
     <entityField>
       <name>ORGNAME</name>
+      <title>Competitor</title>
       <tableName>SALESPROJECT_COMPETITION</tableName>
       <columnName>ORGNAME</columnName>
-      <caption>Competitor</caption>
       <mandatory v="true" />
     </entityField>
     <entityField>
       <name>REASON</name>
+      <title>Reason</title>
       <tableName>SALESPROJECT_COMPETITION</tableName>
       <columnName>REASON</columnName>
-      <caption>Reason</caption>
       <possibleItemsProcess>%aditoprj%/entity/SalesprojectCompetition_entity/entityfields/reason/possibleItemsProcess.js</possibleItemsProcess>
       <onValidation>%aditoprj%/entity/SalesprojectCompetition_entity/entityfields/reason/onValidation.js</onValidation>
     </entityField>
@@ -67,9 +66,9 @@
     </entityField>
     <entityField>
       <name>STATUS</name>
+      <title>State</title>
       <tableName>SALESPROJECT_COMPETITION</tableName>
       <columnName>STATUS</columnName>
-      <caption>State</caption>
       <mandatory v="true" />
       <possibleItemsProcess>%aditoprj%/entity/SalesprojectCompetition_entity/entityfields/status/possibleItemsProcess.js</possibleItemsProcess>
     </entityField>
diff --git a/entity/SalesprojectCycle_entity/SalesprojectCycle_entity.aod b/entity/SalesprojectCycle_entity/SalesprojectCycle_entity.aod
index 45ede6fc87..812e5b1683 100644
--- a/entity/SalesprojectCycle_entity/SalesprojectCycle_entity.aod
+++ b/entity/SalesprojectCycle_entity/SalesprojectCycle_entity.aod
@@ -20,9 +20,9 @@
     </entityField>
     <entityField>
       <name>DATE_START</name>
+      <title>Date</title>
       <tableName>SALESPROJECT_CYCLE</tableName>
       <columnName>DATE_START</columnName>
-      <caption>Date</caption>
       <contentType>DATE</contentType>
       <resolution>DAY</resolution>
     </entityField>
@@ -45,9 +45,9 @@
     </entityField>
     <entityField>
       <name>VALUE</name>
+      <title>Milestone</title>
       <tableName>SALESPROJECT_CYCLE</tableName>
       <columnName>VALUE</columnName>
-      <caption>Milestone</caption>
       <possibleItemsProcess>%aditoprj%/entity/SalesprojectCycle_entity/entityfields/value/possibleItemsProcess.js</possibleItemsProcess>
       <valueProcess>%aditoprj%/entity/SalesprojectCycle_entity/entityfields/value/valueProcess.js</valueProcess>
     </entityField>
diff --git a/entity/SalesprojectForecast_entity/SalesprojectForecast_entity.aod b/entity/SalesprojectForecast_entity/SalesprojectForecast_entity.aod
index da476e6a9a..666bbcb198 100644
--- a/entity/SalesprojectForecast_entity/SalesprojectForecast_entity.aod
+++ b/entity/SalesprojectForecast_entity/SalesprojectForecast_entity.aod
@@ -25,24 +25,24 @@
     </entityField>
     <entityField>
       <name>DATE_START</name>
+      <title>Planned</title>
       <tableName>SALESPROJECT_FORECAST</tableName>
       <columnName>DATE_START</columnName>
-      <caption>Planned</caption>
       <contentType>DATE</contentType>
       <resolution>DAY</resolution>
     </entityField>
     <entityField>
       <name>GROUPCODE</name>
+      <title>Product</title>
       <tableName>SALESPROJECT_FORECAST</tableName>
       <columnName>GROUPCODE</columnName>
-      <caption>Product</caption>
       <possibleItemsProcess>%aditoprj%/entity/SalesprojectForecast_entity/entityfields/groupcode/possibleItemsProcess.js</possibleItemsProcess>
     </entityField>
     <entityField>
       <name>INFO</name>
+      <title>Info</title>
       <tableName>SALESPROJECT_FORECAST</tableName>
       <columnName>INFO</columnName>
-      <caption>Info</caption>
     </entityField>
     <entityField>
       <name>RELATION_ID</name>
@@ -82,7 +82,7 @@
       <name>VOLUME</name>
       <tableName>SALESPROJECT_FORECAST</tableName>
       <columnName>VOLUME</columnName>
-      <captionProcess>%aditoprj%/entity/SalesprojectForecast_entity/entityfields/volume/captionProcess.js</captionProcess>
+      <titleProcess>%aditoprj%/entity/SalesprojectForecast_entity/entityfields/volume/titleProcess.js</titleProcess>
     </entityField>
     <entityParameter>
       <name>SalesprojectId_param</name>
diff --git a/entity/SalesprojectForecast_entity/entityfields/volume/captionProcess.js b/entity/SalesprojectForecast_entity/entityfields/volume/titleProcess.js
similarity index 100%
rename from entity/SalesprojectForecast_entity/entityfields/volume/captionProcess.js
rename to entity/SalesprojectForecast_entity/entityfields/volume/titleProcess.js
diff --git a/entity/SalesprojectMember_entity/SalesprojectMember_entity.aod b/entity/SalesprojectMember_entity/SalesprojectMember_entity.aod
index 5e3dadd566..29e710d1f6 100644
--- a/entity/SalesprojectMember_entity/SalesprojectMember_entity.aod
+++ b/entity/SalesprojectMember_entity/SalesprojectMember_entity.aod
@@ -24,6 +24,7 @@
     </entityField>
     <entityField>
       <name>RELATION_ID</name>
+      <title>Member</title>
       <tableName>SALESPROJECT_MEMBER</tableName>
       <columnName>RELATION_ID</columnName>
     </entityField>
@@ -41,8 +42,10 @@
     </entityField>
     <entityField>
       <name>SALESPROJECT_ROLE</name>
+      <title>Role</title>
       <tableName>SALESPROJECT_MEMBER</tableName>
       <columnName>SALESPROJECT_ROLE</columnName>
+      <possibleItemsProcess>%aditoprj%/entity/SalesprojectMember_entity/entityfields/salesproject_role/possibleItemsProcess.js</possibleItemsProcess>
     </entityField>
     <entityField>
       <name>USER_EDIT</name>
@@ -85,11 +88,13 @@
     </entityField>
     <entityField>
       <name>FIRSTNAME</name>
+      <title>Firstname</title>
       <tableName>PERS</tableName>
       <columnName>FIRSTNAME</columnName>
     </entityField>
     <entityField>
       <name>LASTNAME</name>
+      <title>Lastname</title>
       <tableName>PERS</tableName>
       <columnName>LASTNAME</columnName>
     </entityField>
@@ -105,6 +110,7 @@
     </entityField>
     <entityField>
       <name>PERS_TITLE</name>
+      <title>title</title>
       <tableName>PERS</tableName>
       <columnName>TITLE</columnName>
     </entityField>
diff --git a/entity/SalesprojectMember_entity/entityfields/salesproject_role/possibleItemsProcess.js b/entity/SalesprojectMember_entity/entityfields/salesproject_role/possibleItemsProcess.js
new file mode 100644
index 0000000000..708bd325e7
--- /dev/null
+++ b/entity/SalesprojectMember_entity/entityfields/salesproject_role/possibleItemsProcess.js
@@ -0,0 +1,8 @@
+import("system.result");
+import("Keyword_lib");
+
+var kwdUtils, items;
+
+kwdUtils = new KeywordUtils();
+items = kwdUtils.getStandardArray("SALESPROJECT.ROLE");
+result.object(items);
\ No newline at end of file
diff --git a/entity/SalesprojectSource_entity/SalesprojectSource_entity.aod b/entity/SalesprojectSource_entity/SalesprojectSource_entity.aod
index 8aed5f6118..38e1fb0491 100644
--- a/entity/SalesprojectSource_entity/SalesprojectSource_entity.aod
+++ b/entity/SalesprojectSource_entity/SalesprojectSource_entity.aod
@@ -44,17 +44,17 @@
     </entityField>
     <entityField>
       <name>ENTRYDATE</name>
+      <title>Entrydate</title>
       <tableName>SALESPROJECT_SOURCE</tableName>
       <columnName>ENTRYDATE</columnName>
-      <caption>Entrydate</caption>
       <contentType>DATE</contentType>
       <resolution>DAY</resolution>
     </entityField>
     <entityField>
       <name>INFO</name>
+      <title>Info</title>
       <tableName>SALESPROJECT_SOURCE</tableName>
       <columnName>INFO</columnName>
-      <caption>Info</caption>
     </entityField>
     <entityField>
       <name>SALESPROJECT_ID</name>
@@ -70,9 +70,9 @@
     </entityField>
     <entityField>
       <name>SOURCE</name>
+      <title>Source</title>
       <tableName>SALESPROJECT_SOURCE</tableName>
       <columnName>SOURCE</columnName>
-      <caption>Source</caption>
       <possibleItemsProcess>%aditoprj%/entity/SalesprojectSource_entity/entityfields/source/possibleItemsProcess.js</possibleItemsProcess>
     </entityField>
     <entityField>
diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod
index d466957d7c..a78ae4df6d 100644
--- a/entity/Salesproject_entity/Salesproject_entity.aod
+++ b/entity/Salesproject_entity/Salesproject_entity.aod
@@ -30,18 +30,18 @@
     </entityField>
     <entityField>
       <name>ENDDATE</name>
+      <title>Rollout</title>
       <tableName>SALESPROJECT</tableName>
       <columnName>ENDDATE</columnName>
-      <caption>Rollout</caption>
       <contentType>DATE</contentType>
       <resolution>DAY</resolution>
       <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/enddate/valueProcess.js</valueProcess>
     </entityField>
     <entityField>
       <name>ESTIMATION</name>
+      <title>Estimation</title>
       <tableName>SALESPROJECT</tableName>
       <columnName>ESTIMATION</columnName>
-      <caption>Estimation</caption>
       <possibleItemsProcess>%aditoprj%/entity/Salesproject_entity/entityfields/estimation/possibleItemsProcess.js</possibleItemsProcess>
       <selectionMode>MULTI</selectionMode>
     </entityField>
@@ -52,23 +52,23 @@
     </entityField>
     <entityField>
       <name>INFO</name>
+      <title>Information</title>
       <tableName>SALESPROJECT</tableName>
       <columnName>INFO</columnName>
-      <caption>Information</caption>
     </entityField>
     <entityField>
       <name>PHASE</name>
+      <title>Phase</title>
       <tableName>SALESPROJECT</tableName>
       <columnName>PHASE</columnName>
-      <caption>Phase</caption>
       <mandatory v="true" />
       <possibleItemsProcess>%aditoprj%/entity/Salesproject_entity/entityfields/phase/possibleItemsProcess.js</possibleItemsProcess>
     </entityField>
     <entityField>
       <name>PROJECTCODE</name>
+      <title>Project number</title>
       <tableName>SALESPROJECT</tableName>
       <columnName>PROJECTCODE</columnName>
-      <caption>Project number</caption>
       <state>AUTO</state>
       <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/projectcode/valueProcess.js</valueProcess>
       <onValidation>%aditoprj%/entity/Salesproject_entity/entityfields/projectcode/onValidation.js</onValidation>
@@ -76,16 +76,16 @@
     </entityField>
     <entityField>
       <name>PROJECTTITLE</name>
+      <title>Project title</title>
       <tableName>SALESPROJECT</tableName>
       <columnName>PROJECTTITLE</columnName>
-      <caption>Project title</caption>
       <mandatory v="true" />
     </entityField>
     <entityField>
       <name>RELATION_ID</name>
+      <title>Company</title>
       <tableName>SALESPROJECT</tableName>
       <columnName>RELATION_ID</columnName>
-      <caption>Company</caption>
       <mandatory v="true" />
     </entityField>
     <entityField>
@@ -96,9 +96,9 @@
     </entityField>
     <entityField>
       <name>STARTDATE</name>
+      <title>Project start</title>
       <tableName>SALESPROJECT</tableName>
       <columnName>STARTDATE</columnName>
-      <caption>Project start</caption>
       <contentType>DATE</contentType>
       <resolution>DAY</resolution>
       <mandatory v="true" />
@@ -106,9 +106,9 @@
     </entityField>
     <entityField>
       <name>STATUS</name>
+      <title>Status</title>
       <tableName>SALESPROJECT</tableName>
       <columnName>STATUS</columnName>
-      <caption>Status</caption>
       <mandatory v="true" />
       <possibleItemsProcess>%aditoprj%/entity/Salesproject_entity/entityfields/status/possibleItemsProcess.js</possibleItemsProcess>
     </entityField>
@@ -126,9 +126,9 @@
     </entityField>
     <entityField>
       <name>VOLUME</name>
+      <title>Volume</title>
       <tableName>SALESPROJECT</tableName>
       <columnName>VOLUME</columnName>
-      <caption></caption>
     </entityField>
     <entityOutgoingField>
       <name>SalesprojectOrg_dfo</name>
@@ -141,15 +141,16 @@
     </entityOutgoingField>
     <entityField>
       <name>PROBABILITY</name>
+      <title>Probability</title>
       <tableName>SALESPROJECT</tableName>
       <columnName>PROBABILITY</columnName>
-      <caption></caption>
     </entityField>
     <entityFieldGroup>
       <name>PROBABILITY_DISPLAY_fieldGroup</name>
       <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/probability_display_fieldgroup/valueProcess.js</valueProcess>
+      <title>Probability</title>
       <description>FIELDGROUP</description>
-      <caption>Probability</caption>
+      <caption></caption>
       <fields>
         <element>PROBABILITY</element>
       </fields>
@@ -157,8 +158,8 @@
     <entityFieldGroup>
       <name>VOLUME_DISPLAY_fieldGroup</name>
       <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/volume_display_fieldgroup/valueProcess.js</valueProcess>
+      <title>Volume</title>
       <description>FIELDGROUP</description>
-      <caption>Volume</caption>
       <fields>
         <element>VOLUME</element>
       </fields>
-- 
GitLab