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 0000000000000000000000000000000000000000..bb786527e4b9ae046d8e63dce9123e8ad696779f --- /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 0000000000000000000000000000000000000000..a758e72cef065e43d8e2957e10d8cb1c0751fa31 --- /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 a0a3f2ebe004e0569b30493b05f688b2a1f0759f..4a3cd250c210ed2be2d21fc9f1c0c9be897cc60f 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 9985bae92d3d3b7b2669588eacca0e0be38d9b9b..8b17de684f70e44fb679865ce497af8534f64afc 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 0000000000000000000000000000000000000000..9dd2be39a6b8facd112ed750541682ed95571c9c --- /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 20bdc717713e1706c9e6c86a981b2fb83fc6d0af..ab816d38cf282db509c2e9e1f068f48ff9cde390 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 d020c0d79446761e3d7570fb12c409174c89e2c3..4e5a6938c967b68556fcec85968e22cc5ed7de9a 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 645b2d936511e365614a516e8292c1f34bb3a51f..0000000000000000000000000000000000000000 --- 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 4a5bc0b05c93591807469e2ec88adda2db5cb056..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..b537d2a8f3f250bcf366e2c9a81aa7de5e978e12 --- /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 15972e3f7115acfb8ea105045153ca130eb0db90..b335122509b27a20ec90e52dc2353fe5de5d375b 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 645b2d936511e365614a516e8292c1f34bb3a51f..0000000000000000000000000000000000000000 --- 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 ca41e6e2608d46ef8e47125ee72c25b51d271bd8..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..47b950fc1ae42270522a57fb9feab4355ec2f8e6 --- /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 11a0376a3ae4398236bb8d5833dc3b33c5c6fb4f..750e30d6235e8373614b63764f7f74897af592e1 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 ece0b8e36a049827b257050e159e263d018c66aa..4acc0874e2b9826453abbce9f47bc68ae3645cc3 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";};