From 527fd558f3c211fa8d1a1ec818a3ec3ed0d1cd7d Mon Sep 17 00:00:00 2001 From: "j.goderbauer" <j.goderbauer@adito.de> Date: Fri, 10 May 2019 11:18:48 +0200 Subject: [PATCH] remove TargetGroup-Attribute for Organisations --- .../extendKeywordOrganisationType.xml | 40 +++++++++++++++++++ .../removeAttributeKeywordTargetGroup.xml | 29 ++++++++++++++ .../Data_alias/basic/2019.2/changelog.xml | 2 + .../Organisation_entity.aod | 32 ++++++++------- .../organisationtype_param/documentation.adoc | 1 + .../recordcontainers/db/conditionProcess.js | 2 + entity/Product_entity/Product_entity.aod | 16 ++------ .../attributeid_param/valueProcess.js | 4 -- .../attributekeyid_param/valueProcess.js | 4 -- .../organisationtype_param/valueProcess.js | 4 ++ .../SalesprojectCompetition_entity.aod | 14 +++---- .../attributeid_param/valueProcess.js | 4 -- .../attributekeyid_param/valueProcess.js | 4 -- .../organisationtype_param/valueProcess.js | 4 ++ .../_____LANGUAGE_de/_____LANGUAGE_de.aod | 2 +- process/KeywordRegistry_basic/process.js | 5 +++ 16 files changed, 114 insertions(+), 53 deletions(-) create mode 100644 .liquibase/Data_alias/basic/2019.2/AditoBasic/extendKeywordOrganisationType.xml create mode 100644 .liquibase/Data_alias/basic/2019.2/AditoBasic/removeAttributeKeywordTargetGroup.xml create mode 100644 entity/Organisation_entity/entityfields/organisationtype_param/documentation.adoc delete mode 100644 entity/Product_entity/entityfields/organisations/children/attributeid_param/valueProcess.js delete mode 100644 entity/Product_entity/entityfields/organisations/children/attributekeyid_param/valueProcess.js create mode 100644 entity/Product_entity/entityfields/organisations/children/organisationtype_param/valueProcess.js delete mode 100644 entity/SalesprojectCompetition_entity/entityfields/organisations/children/attributeid_param/valueProcess.js delete mode 100644 entity/SalesprojectCompetition_entity/entityfields/organisations/children/attributekeyid_param/valueProcess.js create mode 100644 entity/SalesprojectCompetition_entity/entityfields/organisations/children/organisationtype_param/valueProcess.js diff --git a/.liquibase/Data_alias/basic/2019.2/AditoBasic/extendKeywordOrganisationType.xml b/.liquibase/Data_alias/basic/2019.2/AditoBasic/extendKeywordOrganisationType.xml new file mode 100644 index 00000000000..bb786527e4b --- /dev/null +++ b/.liquibase/Data_alias/basic/2019.2/AditoBasic/extendKeywordOrganisationType.xml @@ -0,0 +1,40 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="j.goderbauer" id="26ab4f8b-edbf-49c3-a7a3-1e48ca369119"> + <update tableName="AB_KEYWORD_ENTRY"> + <column name="SORTING" valueNumeric="6"/> + <where>AB_KEYWORD_ENTRY.CONTAINER = ? and SORTING = ?</where> + <whereParams> + <param value="OrganisationType" /> + <param valueNumeric="3" /> + </whereParams> + </update> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="7ac75d3d-243c-49d2-9f50-25403fab003a"/> + <column name="KEYID" value="dbb3f596-bd2b-4e08-baef-ba28d7b752e9"/> + <column name="TITLE" value="Manufacturer"/> + <column name="CONTAINER" value="OrganisationType"/> + <column name="SORTING" valueNumeric="3"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="1"/><!-- e.g. used in Product --> + </insert> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="2b9c1bdf-b0bb-447d-a57d-e369cf475fca"/> + <column name="KEYID" value="eccaf9de-5c7b-4b6e-ab77-0b33d8486f29"/> + <column name="TITLE" value="Competitor"/> + <column name="CONTAINER" value="OrganisationType"/> + <column name="SORTING" valueNumeric="4"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="1"/><!-- e.g. used in SalesprojectMember --> + </insert> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="45438bcf-74cf-408f-bc4d-5d70595369c8"/> + <column name="KEYID" value="e9f133a7-27b4-4ce1-ab93-03876ec3de61"/> + <column name="TITLE" value="Partner"/> + <column name="CONTAINER" value="OrganisationType"/> + <column name="SORTING" valueNumeric="5"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="0"/> + </insert> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2019.2/AditoBasic/removeAttributeKeywordTargetGroup.xml b/.liquibase/Data_alias/basic/2019.2/AditoBasic/removeAttributeKeywordTargetGroup.xml new file mode 100644 index 00000000000..a758e72cef0 --- /dev/null +++ b/.liquibase/Data_alias/basic/2019.2/AditoBasic/removeAttributeKeywordTargetGroup.xml @@ -0,0 +1,29 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="j.goderbauer" id="26f320dcd1-9e9d-4a35-a399-ce98c7aa2e11"> + <delete tableName="AB_KEYWORD_ENTRY"> + <where>AB_KEYWORD_ENTRY.CONTAINER = ?</where> + <whereParams> + <param value="TargetGroup" /> + </whereParams> + </delete> + <delete tableName="AB_ATTRIBUTE"> + <where>AB_ATTRIBUTE.AB_ATTRIBUTEID = ?</where> + <whereParams> + <param value="5d1a2b05-f04e-4ad7-9fd0-8efa09a33a53" /> + </whereParams> + </delete> + <delete tableName="AB_ATTRIBUTERELATION"> + <where>AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID = ?</where> + <whereParams> + <param value="5d1a2b05-f04e-4ad7-9fd0-8efa09a33a53" /> + </whereParams> + </delete> + <delete tableName="AB_ATTRIBUTEUSAGE"> + <where>AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID = ?</where> + <whereParams> + <param value="5d1a2b05-f04e-4ad7-9fd0-8efa09a33a53" /> + </whereParams> + </delete> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2019.2/changelog.xml b/.liquibase/Data_alias/basic/2019.2/changelog.xml index a0a3f2ebe00..4a3cd250c21 100644 --- a/.liquibase/Data_alias/basic/2019.2/changelog.xml +++ b/.liquibase/Data_alias/basic/2019.2/changelog.xml @@ -163,4 +163,6 @@ <include relativeToChangelogFile="true" file="CampaignManagement/create_campaignCostCategory.xml"/> <include relativeToChangelogFile="true" file="AditoBasic/ActivityDirectionKeyword_add_icon_attr.xml"/> + <include relativeToChangelogFile="true" file="AditoBasic/extendKeywordOrganisationType.xml"/> + <include relativeToChangelogFile="true" file="AditoBasic/removeAttributeKeywordTargetGroup.xml"/> </databaseChangeLog> diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index 9985bae92d3..8b17de684f7 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -118,6 +118,18 @@ <fieldName>Organisations</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>2eb60a6e-575c-4579-9278-5868ffe4bc75</name> + <entityName>Product_entity</entityName> + <fieldName>Organisations</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>71be0991-5bd8-4046-89b5-41d9a152202b</name> + <entityName>SalesprojectCompetition_entity</entityName> + <fieldName>Organisations</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> @@ -671,20 +683,6 @@ <entityProvider> <name>WithAttribute</name> <fieldType>DEPENDENCY_IN</fieldType> - <dependencies> - <entityDependency> - <name>10480df2-f0b6-4cb6-8bfb-4a468b994996</name> - <entityName>SalesprojectCompetition_entity</entityName> - <fieldName>Organisations</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>f368be61-1a15-449f-b37c-b1343069412c</name> - <entityName>Product_entity</entityName> - <fieldName>Organisations</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>AttributeId_param</name> @@ -801,6 +799,12 @@ <iconId>NEON:GROUP_APPOINTMENT</iconId> <tooltip>Choose a campaign and a step to add the contact to a campaign</tooltip> </entityActionField> + <entityParameter> + <name>OrganisationType_param</name> + <expose v="true" /> + <documentation>%aditoprj%/entity/Organisation_entity/entityfields/organisationtype_param/documentation.adoc</documentation> + <description>PARAMETER</description> + </entityParameter> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Organisation_entity/entityfields/organisationtype_param/documentation.adoc b/entity/Organisation_entity/entityfields/organisationtype_param/documentation.adoc new file mode 100644 index 00000000000..9dd2be39a6b --- /dev/null +++ b/entity/Organisation_entity/entityfields/organisationtype_param/documentation.adoc @@ -0,0 +1 @@ +Param for filtering a specific organisationtype. (OrganisationType is a keyword) \ No newline at end of file diff --git a/entity/Organisation_entity/recordcontainers/db/conditionProcess.js b/entity/Organisation_entity/recordcontainers/db/conditionProcess.js index 20bdc717713..ab816d38cf2 100644 --- a/entity/Organisation_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Organisation_entity/recordcontainers/db/conditionProcess.js @@ -40,5 +40,7 @@ if (vars.exists("$param.ExcludedContactIds_param") && vars.get("$param.ExcludedC cond.andSqlCondition(excludedCond, "1=1"); } +cond.andPrepareVars("ORGANISATION.TYPE", "$param.OrganisationType_param"); + //TODO: use a preparedCondition when available #1030812 #1034026 result.string(db.translateCondition(cond.build("1 = 1"))); \ No newline at end of file diff --git a/entity/Product_entity/Product_entity.aod b/entity/Product_entity/Product_entity.aod index d020c0d7944..4e5a6938c96 100644 --- a/entity/Product_entity/Product_entity.aod +++ b/entity/Product_entity/Product_entity.aod @@ -85,16 +85,12 @@ <dependency> <name>dependency</name> <entityName>Organisation_entity</entityName> - <fieldName>WithAttribute</fieldName> + <fieldName>Organisations</fieldName> </dependency> <children> <entityParameter> - <name>AttributeId_param</name> - <valueProcess>%aditoprj%/entity/Product_entity/entityfields/organisations/children/attributeid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>AttributeKeyId_param</name> - <valueProcess>%aditoprj%/entity/Product_entity/entityfields/organisations/children/attributekeyid_param/valueProcess.js</valueProcess> + <name>OrganisationType_param</name> + <valueProcess>%aditoprj%/entity/Product_entity/entityfields/organisations/children/organisationtype_param/valueProcess.js</valueProcess> </entityParameter> </children> </entityConsumer> @@ -222,9 +218,6 @@ <fieldName>Documents</fieldName> </dependency> <children> - <entityParameter> - <name>AssignmentName_param</name> - </entityParameter> <entityParameter> <name>AssignmentRowId_param</name> <valueProcess>%aditoprj%/entity/Product_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess> @@ -245,9 +238,6 @@ <fieldName>MainDocuments</fieldName> </dependency> <children> - <entityParameter> - <name>AssignmentName_param</name> - </entityParameter> <entityParameter> <name>AssignmentRowId_param</name> <valueProcess>%aditoprj%/entity/Product_entity/entityfields/maindocuments/children/assignmentrowid_param/valueProcess.js</valueProcess> diff --git a/entity/Product_entity/entityfields/organisations/children/attributeid_param/valueProcess.js b/entity/Product_entity/entityfields/organisations/children/attributeid_param/valueProcess.js deleted file mode 100644 index 645b2d93651..00000000000 --- a/entity/Product_entity/entityfields/organisations/children/attributeid_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.result"); - -// Target Group (Zielgruppe) -result.string("5d1a2b05-f04e-4ad7-9fd0-8efa09a33a53"); \ No newline at end of file diff --git a/entity/Product_entity/entityfields/organisations/children/attributekeyid_param/valueProcess.js b/entity/Product_entity/entityfields/organisations/children/attributekeyid_param/valueProcess.js deleted file mode 100644 index 4a5bc0b05c9..00000000000 --- a/entity/Product_entity/entityfields/organisations/children/attributekeyid_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.result"); - -// Manufacturer -result.string("41b0832f-8de2-4ab5-a6e0-9a793c5f80c3"); \ No newline at end of file diff --git a/entity/Product_entity/entityfields/organisations/children/organisationtype_param/valueProcess.js b/entity/Product_entity/entityfields/organisations/children/organisationtype_param/valueProcess.js new file mode 100644 index 00000000000..b537d2a8f3f --- /dev/null +++ b/entity/Product_entity/entityfields/organisations/children/organisationtype_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("KeywordRegistry_basic"); + +result.string($KeywordRegistry.organisationType$manufacturer()); \ No newline at end of file diff --git a/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod b/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod index 15972e3f711..b335122509b 100644 --- a/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod +++ b/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod @@ -110,21 +110,17 @@ <dependency> <name>dependency</name> <entityName>Organisation_entity</entityName> - <fieldName>WithAttribute</fieldName> + <fieldName>Organisations</fieldName> </dependency> <children> - <entityParameter> - <name>AttributeId_param</name> - <valueProcess>%aditoprj%/entity/SalesprojectCompetition_entity/entityfields/organisations/children/attributeid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>AttributeKeyId_param</name> - <valueProcess>%aditoprj%/entity/SalesprojectCompetition_entity/entityfields/organisations/children/attributekeyid_param/valueProcess.js</valueProcess> - </entityParameter> <entityParameter> <name>ExcludedContactIds_param</name> <valueProcess>%aditoprj%/entity/SalesprojectCompetition_entity/entityfields/organisations/children/excludedcontactids_param/valueProcess.js</valueProcess> </entityParameter> + <entityParameter> + <name>OrganisationType_param</name> + <valueProcess>%aditoprj%/entity/SalesprojectCompetition_entity/entityfields/organisations/children/organisationtype_param/valueProcess.js</valueProcess> + </entityParameter> </children> </entityConsumer> <entityConsumer> diff --git a/entity/SalesprojectCompetition_entity/entityfields/organisations/children/attributeid_param/valueProcess.js b/entity/SalesprojectCompetition_entity/entityfields/organisations/children/attributeid_param/valueProcess.js deleted file mode 100644 index 645b2d93651..00000000000 --- a/entity/SalesprojectCompetition_entity/entityfields/organisations/children/attributeid_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.result"); - -// Target Group (Zielgruppe) -result.string("5d1a2b05-f04e-4ad7-9fd0-8efa09a33a53"); \ No newline at end of file diff --git a/entity/SalesprojectCompetition_entity/entityfields/organisations/children/attributekeyid_param/valueProcess.js b/entity/SalesprojectCompetition_entity/entityfields/organisations/children/attributekeyid_param/valueProcess.js deleted file mode 100644 index ca41e6e2608..00000000000 --- a/entity/SalesprojectCompetition_entity/entityfields/organisations/children/attributekeyid_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.result"); - -// Competitor -result.string("fc09afd5-5f74-4e48-af26-3600bb4c9610"); \ No newline at end of file diff --git a/entity/SalesprojectCompetition_entity/entityfields/organisations/children/organisationtype_param/valueProcess.js b/entity/SalesprojectCompetition_entity/entityfields/organisations/children/organisationtype_param/valueProcess.js new file mode 100644 index 00000000000..47b950fc1ae --- /dev/null +++ b/entity/SalesprojectCompetition_entity/entityfields/organisations/children/organisationtype_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("KeywordRegistry_basic"); + +result.string($KeywordRegistry.organisationType$competitor()); \ No newline at end of file diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 11a0376a3ae..750e30d6235 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -2288,7 +2288,7 @@ </entry> <entry> <key>Prospect</key> - <value>Potenzieller Kunde</value> + <value>Interessent</value> </entry> <entry> <key>Estonia</key> diff --git a/process/KeywordRegistry_basic/process.js b/process/KeywordRegistry_basic/process.js index ece0b8e36a0..4acc0874e2b 100644 --- a/process/KeywordRegistry_basic/process.js +++ b/process/KeywordRegistry_basic/process.js @@ -33,7 +33,12 @@ $KeywordRegistry.contactStatus$active = function(){return "BSIC0rel-stat-actv-ae $KeywordRegistry.currency = function(){return "Currency";}; $KeywordRegistry.productGroupcode = function(){return "ProductGroupcode";}; $KeywordRegistry.offerStatus = function(){return "OfferStatus";}; + $KeywordRegistry.organisationType = function(){return "OrganisationType";}; +$KeywordRegistry.organisationType$manufacturer = function(){return "dbb3f596-bd2b-4e08-baef-ba28d7b752e9";}; +$KeywordRegistry.organisationType$competitor = function(){return "eccaf9de-5c7b-4b6e-ab77-0b33d8486f29";}; + + $KeywordRegistry.personGender = function(){return "PersonGender";}; $KeywordRegistry.taskStatus = function(){return "TaskStatus";}; $KeywordRegistry.taskStatus$new = function(){return "21bc4d20-1a87-4247-8f7c-8d3a09631850";}; -- GitLab