diff --git a/.liquibase/Data_alias/basic/2019.3.2/reworkDbIndexes.xml b/.liquibase/Data_alias/basic/2019.3.2/reworkDbIndexes.xml index 62c9c29573a17ca606e5c08d2f5ed680729208ae..c1d76b19cd28910c8be6ee4cb90f1a5a8b1e5541 100644 --- a/.liquibase/Data_alias/basic/2019.3.2/reworkDbIndexes.xml +++ b/.liquibase/Data_alias/basic/2019.3.2/reworkDbIndexes.xml @@ -10,10 +10,10 @@ <column name="ACTIVITY_ID"/> </createIndex> </changeSet> - <changeSet id="e7527e13-7546-4fa6-ac95-5cc3e1f27056" author="s.listl" dbms="!oracle"> + <changeSet id="e7527e13-7546-4fa6-ac95-5cc3e1f27056" author="s.listl"> <preConditions onFail="MARK_RAN"> <not> - <changeSetExecuted id="5a0b62f4-6770-454c-9a0e-d60ca16596dd" author="j.goderbauer"/> + <changeSetExecuted id="5a0b62f4-6770-454c-9a0e-d60ca16596dd" author="j.goderbauer" changeLogFile=".liquibase/Data_alias/basic/2019.3.2/reworkDbIndexes.xml"/> </not> </preConditions> <createIndex indexName="IDX_TICKET_TASK_ID" tableName="TICKET"> diff --git a/.liquibase/Data_alias/basic/2020.2.2/alter_CampaignParticipantResponsible.xml b/.liquibase/Data_alias/basic/2020.2.2/alter_CampaignParticipantResponsible.xml new file mode 100644 index 0000000000000000000000000000000000000000..349148d665121715e6703272fde03c4da372a7c0 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/alter_CampaignParticipantResponsible.xml @@ -0,0 +1,10 @@ +<?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="a.voegl" id="2a30b35b-9882-468e-98a6-a10f0561a681"> + <addColumn tableName="CAMPAIGNPARTICIPANT"> + <column name="RESPONSIBLE_CONTACT_ID" type="CHAR(36)"/> + </addColumn> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2020.2.2/changelog.xml b/.liquibase/Data_alias/basic/2020.2.2/changelog.xml index 052c3a8db2d87746759451543e6de5feceb740cb..f1519ab694e0dddb03b384534a5518567dee75d4 100644 --- a/.liquibase/Data_alias/basic/2020.2.2/changelog.xml +++ b/.liquibase/Data_alias/basic/2020.2.2/changelog.xml @@ -4,5 +4,8 @@ <include relativeToChangelogFile="true" file="insert_commMediumTitleKeywordAttribute.xml"/> <include relativeToChangelogFile="true" file="Knowledgemanagement/changelog_knowledgeManagement.xml"/> <include relativeToChangelogFile="true" file="insert_employeeCountAttribute.xml"/> + <include relativeToChangelogFile="true" file="alter_CampaignParticipantResponsible.xml"/> <include relativeToChangelogFile="true" file="MSTeams/changelog.xml"/> -</databaseChangeLog> + <include relativeToChangelogFile="true" file="insert_newsletterAttribute.xml"/> + <include relativeToChangelogFile="true" file="readd_ExporttemplateIndizes.xml"/> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2020.2.2/insert_newsletterAttribute.xml b/.liquibase/Data_alias/basic/2020.2.2/insert_newsletterAttribute.xml new file mode 100644 index 0000000000000000000000000000000000000000..af877f23248b079e318b4a090bbb6e8fe3d90cd5 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/insert_newsletterAttribute.xml @@ -0,0 +1,33 @@ +<?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="s.listl" id="4b285b34-29bc-4446-8d95-37cfcff7bd58"> + <insert tableName="AB_ATTRIBUTE"> + <column name="AB_ATTRIBUTEID" value="cf985906-b4f9-443e-9d7b-edbeb60ca463"/> + <column name="ATTRIBUTE_NAME" value="Marketing"/> + <column name="ATTRIBUTE_TYPE" value="GROUP"/> + <column name="ATTRIBUTE_ACTIVE" valueNumeric="1"/> + </insert> + <insert tableName="AB_ATTRIBUTE"> + <column name="AB_ATTRIBUTEID" value="e196975c-6cfd-46dc-9cb2-053893ec2faa"/> + <column name="ATTRIBUTE_PARENT_ID" value="cf985906-b4f9-443e-9d7b-edbeb60ca463"/> + <column name="ATTRIBUTE_NAME" value="Newsletter"/> + <column name="ATTRIBUTE_TYPE" value="BOOLEAN"/> + <column name="ATTRIBUTE_ACTIVE" valueNumeric="1"/> + <column name="SORTING" valueNumeric="0"/> + </insert> + <insert tableName="AB_ATTRIBUTEUSAGE"> + <column name="AB_ATTRIBUTEUSAGEID" value="e9842896-628c-4c80-a0ef-811f35b8ae51"/> + <column name="AB_ATTRIBUTE_ID" value="cf985906-b4f9-443e-9d7b-edbeb60ca463"/> + <column name="OBJECT_TYPE" value="Person"/> + <column name="MAX_COUNT" valueNumeric="1"/> + </insert> + <insert tableName="AB_ATTRIBUTEUSAGE"> + <column name="AB_ATTRIBUTEUSAGEID" value="fc594860-76c5-4acb-9758-44ea1a1db5d0"/> + <column name="AB_ATTRIBUTE_ID" value="e196975c-6cfd-46dc-9cb2-053893ec2faa"/> + <column name="OBJECT_TYPE" value="Person"/> + <column name="MAX_COUNT" valueNumeric="1"/> + </insert> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2020.2.2/readd_ExporttemplateIndizes.xml b/.liquibase/Data_alias/basic/2020.2.2/readd_ExporttemplateIndizes.xml new file mode 100644 index 0000000000000000000000000000000000000000..67891291f5b0e2c0ea3df39d310b0d6939c77481 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/readd_ExporttemplateIndizes.xml @@ -0,0 +1,36 @@ +<?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"> + <!-- in some cases --> + <changeSet author="j.goderbauer" id="140794d8-eb75-4087-a45a-71b0f547e60a"> + <preConditions onFail="MARK_RAN"> + <not> + <indexExists indexName="idx_exprttmpfld_tmpltid" /> + </not> + </preConditions> + <createIndex indexName="idx_exprttmpfld_tmpltid" tableName="EXPORTTEMPLATEFIELD"> + <column name="EXPORTTEMPLATE_ID"/> + </createIndex> + </changeSet> + <changeSet author="j.goderbauer" id="e952abd0-29f4-4d6c-b650-ef925248ae18"> + <preConditions onFail="MARK_RAN"> + <not> + <indexExists indexName="idx_exprttmppou_tmpltid" /> + </not> + </preConditions> + <createIndex indexName="idx_exprttmppou_tmpltid" tableName="EXPORTTEMPLATEPLACEOFUSE"> + <column name="EXPORTTEMPLATE_ID"/> + </createIndex> + </changeSet> + <changeSet author="j.goderbauer" id="b49a1ac9-80b2-4cfd-b7cd-bdfee4bc0cd8"> + <preConditions onFail="MARK_RAN"> + <not> + <indexExists indexName="idx_exprttmpselection_tmpltid" /> + </not> + </preConditions> + <createIndex indexName="idx_exprttmpselection_tmpltid" tableName="EXPORTTEMPLATESELECTION"> + <column name="EXPORTTEMPLATE_ID"/> + </createIndex> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_aliasconfig.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_aliasconfig.xml index 84b8857d8d5e08885c286dde38ffc6a9c93b1701..8da963bc9892353e093b84f03ae816b204209090 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_aliasconfig.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_aliasconfig.xml @@ -13,7 +13,7 @@ <constraints nullable="false"/> </column> <column name="NAME" type="NVARCHAR(63)"> - <constraints nullable="false"/> + <constraints nullable="false" unique="true"/> </column> <column name="TITLE" type="NVARCHAR(63)"/> <column name="DESCRIPTION" type="NVARCHAR(255)"/> @@ -26,5 +26,8 @@ <createIndex tableName="ASYS_ALIASCONFIG" indexName="IDX_ASYS_ALIASCONFIG_SERVERID"> <column name="SERVERID"/> </createIndex> + <createIndex tableName="ASYS_ALIASCONFIG" indexName="IDX_ASYS_ALIASCONFIG_ALIASID"> + <column name="ALIASID"/> + </createIndex> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_calendarbackend.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_calendarbackend.xml index e037c40bd68234584e01385d2b9f570bd92b4635..939fc396efeac5d3d51bb1e67082b609e39ba406 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_calendarbackend.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_calendarbackend.xml @@ -23,5 +23,34 @@ <column name="TRANSP" type="CHAR(1)"/> <column name="VCOMPONENT" type="CLOB"/> </createTable> + <createIndex tableName="ASYS_CALENDARBACKEND" indexName="IDX_CALENDARBACK_ENTRYTYPE"> + <column name="ENTRYTYPE"/> + </createIndex> + <createIndex tableName="ASYS_CALENDARBACKEND" indexName="IDX_CALENDARBACK_STARTTIME"> + <column name="STARTTIME"/> + </createIndex> + <createIndex tableName="ASYS_CALENDARBACKEND" indexName="IDX_CALENDARBACK_STATUS"> + <column name="STATUS"/> + </createIndex> + <createIndex tableName="ASYS_CALENDARBACKEND" indexName="IDX_CALENDARBACK_ENDTIME"> + <column name="ENDTIME"/> + </createIndex> + <createIndex tableName="ASYS_CALENDARBACKEND" indexName="IDX_CALENDARBACK_MAILBOX"> + <column name="MAILBOX"/> + </createIndex> + <createIndex tableName="ASYS_CALENDARBACKEND" indexName="IDX_CALENDARBACK_LASTMOD"> + <column name="LASTMODIFIED"/> + </createIndex> + <createIndex tableName="ASYS_CALENDARBACKEND" indexName="IDX_CALENDARBACK_DTSTART"> + <column name="DTSTART"/> + </createIndex> + <createIndex tableName="ASYS_CALENDARBACKEND" indexName="IDX_CALENDARBACK_DTEND"> + <column name="DTEND"/> + </createIndex> +</changeSet> +<changeSet id="4810b7c6-50f6-44f6-a0b5-83a3adfae6f7" author="s.listl" dbms="!mssql,!mysql,!mariadb"> + <createIndex tableName="ASYS_CALENDARBACKEND" indexName="IDX_CALENDARBACK_ELEMENTUID"> + <column name="ELEMENTUID"/> + </createIndex> </changeSet> </databaseChangeLog> diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_calendarlink.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_calendarlink.xml index 4e0f73a0b10270db715663c22349f57547d93abd..a9535f3f3ac114811a1e0159a6e9d71bafb39c84 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_calendarlink.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_calendarlink.xml @@ -2,19 +2,25 @@ <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="a.schindlbeck" id="c31ed111-b98d-46b6-b7bf-845420624e28"> <createTable tableName="ASYS_CALENDARLINK"> - <column name="DBALIAS" type="VARCHAR(127)"/> - <column name="DBID" type="VARCHAR(191)"> - <constraints primaryKey="true" primaryKeyName="PK_ASYS_CALENDARLINK_DBID"/> + <column name="ID" type="CHAR(36)"> + <constraints nullable="false" primaryKey="true" primaryKeyName="PK_ASYS_CALENDARLINK_ID"/> </column> + <column name="DBALIAS" type="VARCHAR(127)"/> + <column name="DBID" type="VARCHAR(1023)"/> <column name="DBIDCOLUMN" type="VARCHAR(127)"/> <column name="DBTABLENAME" type="VARCHAR(127)"/> <column name="ENTRYID" type="VARCHAR(512)"/> <column name="ENTRYSTORE" type="VARCHAR(255)"/> <column name="FRAME" type="VARCHAR(1023)"/> - <column name="ID" type="CHAR(36)"> - <constraints nullable="false"/> - </column> <column name="TITLE" type="VARCHAR(2000)"/> </createTable> </changeSet> +<changeSet id="bf6546b4-67e3-4996-bcd9-77a534127b01" author="s.listl" dbms="!mssql,!mysql,!mariadb"> + <createIndex tableName="ASYS_CALENDARLINK" indexName="IDX_ASYS_CALENDARLINK_ENTRYID"> + <column name="ENTRYID"/> + </createIndex> + <createIndex tableName="ASYS_CALENDARLINK" indexName="IDX_ASYS_CALENDARLINK_DBID"> + <column name="DBID"/> + </createIndex> +</changeSet> </databaseChangeLog> diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_collector_data.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_collector_data.xml index 5f8ddc0ed26f8961dde66978901ff46162f17104..6fcc01993321b4f11d7668493a296751e846f0ae 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_collector_data.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_collector_data.xml @@ -10,5 +10,8 @@ <column name="PARENTID" type="CHAR(63)"/> <column name="METRICS" type="CLOB"/> </createTable> + <createIndex tableName="ASYS_COLLECTOR_DATA" indexName="IDX_COLLECTORDATA_TIMECOLLECT"> + <column name="TIMECOLLECTED"/> + </createIndex> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_collector_tags.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_collector_tags.xml index 1fcaf740d8ac5c8f29254872634be78af9426f0e..133aff97c3446084db51cfcf51d91cc3c52015cf 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_collector_tags.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_collector_tags.xml @@ -3,10 +3,15 @@ <changeSet author="j.hoermann" id="4fe7309e-e131-4f3d-8e65-fb399fcd7090"> <createTable tableName="ASYS_COLLECTOR_TAGS"> <column name="COLLECTORDATAID" type="CHAR(63)"> - <constraints primaryKey="true" primaryKeyName="PK_ASYS_COLLECTOR_TAGS_ID"/> + <constraints nullable="false"/> + </column> + <column name="TAGNAME" type="VARCHAR(63)"> + <constraints nullable="false"/> + </column> + <column name="TAGVALUE" type="VARCHAR(63)"> + <constraints nullable="false"/> </column> - <column name="TAGNAME" type="VARCHAR(63)"/> - <column name="TAGVALUE" type="VARCHAR(63)"/> </createTable> + <addPrimaryKey tableName="ASYS_COLLECTOR_TAGS" columnNames="COLLECTORDATAID, TAGNAME, TAGVALUE" constraintName="PK_ASYS_COLLECTOR_TAGS"/> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_dashletconfigurations.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_dashletconfigurations.xml index 6ecf84fd630421d50a01ef071830269f8538cfa8..369537c606f93165cf7710c569d7cd21db94672d 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_dashletconfigurations.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_dashletconfigurations.xml @@ -2,22 +2,22 @@ <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.hoermann" id="a510b5e9-e599-4503-8bcd-4ef2465f56c6"> <createTable tableName="ASYS_DASHLETCONFIGURATIONS"> - <column name="ID" type="CHAR(36)"> + <column name="ID" type="CHAR(63)"> <constraints primaryKey="true" primaryKeyName="PK_ASYS_ASYS_DASHLETCONFIGURATIONS_ID"/> </column> - <column name="CATEGORIES" type="CLOB"/> + <column name="NAME" type="VARCHAR(63)"/> + <column name="TITLE" type="VARCHAR(63)"/> + <column name="VIEW_NAME" type="VARCHAR(512)"/> <column name="DESCRIPTION" type="VARCHAR(512)"/> - <column name="FRAGMENT" type="VARCHAR(1023)"/> - <column name="FRAGMENT_CUSTOMIZABLE" type="INTEGER"/> <column name="ICON" type="VARCHAR(63)"/> - <column name="NAME" type="VARCHAR(63)"/> - <column name="PARAMETERS" type="CLOB"/> + <column name="FRAGMENT" type="VARCHAR(1023)"/> <column name="PREVIEW" type="CLOB"/> - <column name="REQUIRES_CONFIGURATION" type="INTEGER"/> <column name="SINGLETON" type="INTEGER"/> + <column name="FRAGMENT_CUSTOMIZABLE" type="INTEGER"/> + <column name="REQUIRES_CONFIGURATION" type="INTEGER"/> + <column name="CATEGORIES" type="CLOB"/> + <column name="PARAMETERS" type="CLOB"/> <column name="STORE_ROLES" type="VARCHAR(1023)"/> - <column name="TITLE" type="VARCHAR(63)"/> - <column name="VIEW_NAME" type="VARCHAR(63)"/> </createTable> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_dashlets.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_dashlets.xml index f5ea6eb9088d0ea83e950d2e4d259d3eaddc5207..5b3d2d5a60bf48258a8e82957e9db0d43fbf34f8 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_dashlets.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_dashlets.xml @@ -2,18 +2,18 @@ <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.hoermann" id="dbdfa16c-8e62-4fc6-8d79-2a14a0d863c5"> <createTable tableName="ASYS_DASHLETS"> - <column name="ID" type="CHAR(36)"> + <column name="ID" type="CHAR(63)"> <constraints primaryKey="true" primaryKeyName="PK_ASYS_DASHLETS_ID"/> </column> - <column name="COLSPAN" type="INTEGER"/> - <column name="CONFIGURATION_ID" type="VARCHAR(63)"/> <column name="DASHBOARD_ID" type="VARCHAR(63)"/> + <column name="CONFIGURATION_ID" type="VARCHAR(63)"/> + <column name="TITLE" type="VARCHAR(63)"/> <column name="FRAGMENT" type="VARCHAR(1023)"/> <column name="PARAMETERS" type="CLOB"/> - <column name="ROWSPAN" type="INTEGER"/> - <column name="TITLE" type="VARCHAR(63)"/> <column name="X" type="INTEGER"/> <column name="Y" type="INTEGER"/> + <column name="COLSPAN" type="INTEGER"/> + <column name="ROWSPAN" type="INTEGER"/> </createTable> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml index fb1ae2f5ee87ef81421765227ffdeca8682dd681..e77db9a1c3d3b13f9b4c297bf36cde0a4d92ccad 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml @@ -7,20 +7,17 @@ </column> <column name="BACKPACK" type="CLOB"/> <column name="CAPTION" type="VARCHAR(512)"/> - <column name="CREATEDATE" type="TIMESTAMP"/> - <column name="DELETEDATE" type="TIMESTAMP"/> + <column name="CREATEDATE" type="DATETIME"/> <column name="DESCRIPTION" type="VARCHAR(1023)"/> <column name="FORCEDPRIORITY" type="VARCHAR(15)"/> <column name="ICON_INFO" type="VARCHAR(1023)"/> + <column name="DELETEDATE" type="DATETIME"/> <column name="LINK_INFO" type="VARCHAR(1023)"/> <column name="ORIGINATORNAME" type="VARCHAR(63)"/> <column name="RECIPIENTUSERIDS" type="CLOB"/> <column name="TYPECODE" type="VARCHAR(63)"/> <column name="VERSION" type="INTEGER"/> + <column name="SUBCATEGORY" type="VARCHAR(256)"/> </createTable> - - <createIndex indexName="idx_asysnoticontents_contid" tableName="ASYS_NOTIFICATIONCONTENTS"> - <column name="CONTENTID"/> - </createIndex> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notifications.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notifications.xml index f3ff1e9ae1ccab5ab2fc46dba3c28bc9e0a783ac..5ecd347c48718a326ba9ec9119f3b9d2e55f6e6c 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notifications.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notifications.xml @@ -6,7 +6,7 @@ <constraints primaryKey="true" primaryKeyName="PK_ASYS_NOTIFICATIONS_ID"/> </column> <column name="CONTENTID" type="CHAR(36)"/> - <column name="STATE" type="VARCHAR(15)"/> + <column name="STATE" type="VARCHAR(16)"/> <column name="USERID" type="VARCHAR(63)"/> <column name="RESOLVEDPRIORITY" type="VARCHAR(15)"/> </createTable> diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_recordgroup.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_recordgroup.xml index c8fae3a479ec0862f068aee234a572c3f092d5c7..35ddb98cb9bb10336fa9fcfa993cd135f1f31b33 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_recordgroup.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_recordgroup.xml @@ -9,9 +9,6 @@ <column name="TITLE" type="VARCHAR(256)"/> <column name="GROUP_TYPE" type="VARCHAR(64)"/> </createTable> - <createIndex indexName="idx_asysrecordgroup_id" tableName="ASYS_RECORDGROUP"> - <column name="ID"/> - </createIndex> <createIndex indexName="idx_asysrecordgroup_userid" tableName="ASYS_RECORDGROUP"> <column name="USER_ID"/> </createIndex> diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_roles.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_roles.xml index 4ea33eeb65bbdce19c15b13db043c8fc744e58ab..9f54423b467e072e41b99e53eabf9789457083c0 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_roles.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_roles.xml @@ -5,10 +5,10 @@ <column name="ROLENAME" type="VARCHAR(63)"> <constraints primaryKey="true" primaryKeyName="PK_ASYS_ROLES_ID"/> </column> - <column name="ROLETITLE" type="VARCHAR(63)"/> + <column name="ROLETITLE" type="NVARCHAR(63)"/> <column name="ROLEDESCRIPTION" type="VARCHAR(255)"/> - <column name="ASSIGNABLE" type="INTEGER"/> - <column name="CHILDREN" type="CLOB"/> + <column name="ASSIGNABLE" type="TINYINT"/> + <column name="CHILDREN" type="NCLOB"/> </createTable> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_roles_children.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_roles_children.xml index 9dd2c8b7d6d65db71a4b6ecb4b3482f1763c74ad..83fff19bd005bb2e605f38b29a189461f5970c26 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_roles_children.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_roles_children.xml @@ -6,7 +6,7 @@ <constraints primaryKey="true" primaryKeyName="PK_ASYS_ROLES_CHILDREN_ID"/> </column> <column name="PARENT_ROLE" type="VARCHAR(63)"/> - <column name="CHILD_ROLE" type="VARCHAR(63)"/> + <column name="CHILD_ROLE" type="NVARCHAR(63)"/> </createTable> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_sequences.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_sequences.xml index 4e001416ea8db72052f9da8c0d0925e90d225150..ec0459b46b9596c3ba26f3aa4f3239bef0ea8608 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_sequences.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_sequences.xml @@ -13,5 +13,8 @@ <constraints nullable="false"/> </column> </createTable> + <createIndex tableName="ASYS_SEQUENCES" indexName="IDX_ASYS_SEQUENCES_ID_GUID"> + <column name="ID_GUID"/> + </createIndex> </changeSet> </databaseChangeLog> diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_timers_serverruns.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_timers_serverruns.xml index fea891c550df4d29827915634728cef5af053042..fb86982a2864b0d101a4fffb0ecd3106b14335c2 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_timers_serverruns.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_timers_serverruns.xml @@ -13,6 +13,6 @@ </createTable> <addPrimaryKey tableName="ASYS_TIMERS_SERVERRUNS" columnNames="SERVERID, TIMERID" - constraintName="PK_ASYS_TIMERS_SERVERRUNS_SERVERID_TIMERID"/> + constraintName="PK_ASYS_TIMERS_SERVERRUNS"/> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_users.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_users.xml index c8d26b66bf9e3b832991f2f6f2be6522b0d58043..c2064247aa6464b3bda6f5abce670daf632404a2 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_users.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_users.xml @@ -1,37 +1,38 @@ <?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.hoermann" id="77e5fc97-1e89-45e2-a00f-29742d28ab7e"> - <createTable tableName="ASYS_USERS"> - <column name="ID" type="CHAR(36)"> - <constraints primaryKey="true" primaryKeyName="PK_ASYS_USERS_ID"/> - </column> - <column name="DATE_NEW" type="DATETIME"/> - <column name="DATE_EDIT" type="DATETIME"/> - <column name="NAME" type="NVARCHAR(63)"> - <constraints nullable="false"/> - </column> - <column name="GROUPID" type="NVARCHAR(63)"> - <constraints nullable="false"/> - </column> - <column name="PROPKEY" type="VARCHAR(1024)"> - <constraints nullable="false"/> - </column> - <column name="PROPVAL" type="VARCHAR(1024)"/> - <column name="PROPVAL_CLOB" type="CLOB"/> - </createTable> - <createIndex indexName="IDX_ASYS_USERS_NAME" tableName="ASYS_USERS"> - <column name="NAME"/> - </createIndex> - <createIndex indexName="idx_asysusers_groupid" tableName="ASYS_USERS"> - <column name="GROUPID"/> - </createIndex> - <!--normally a index should be created for propkey and propval but this causes due to it's length problems on some dbms--> - <!--<createIndex indexName="idx_asysusers_propkey" tableName="ASYS_USERS"> - <column name="PROPKEY"/> - </createIndex> - <createIndex indexName="idx_asysusers_propval" tableName="ASYS_USERS"> - <column name="PROPVAL"/> - </createIndex>--> - -</changeSet> + <changeSet author="j.hoermann" id="77e5fc97-1e89-45e2-a00f-29742d28ab7e"> + <createTable tableName="ASYS_USERS"> + <column name="ID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_ASYS_USERS_ID"/> + </column> + <column name="DATE_NEW" type="DATETIME"/> + <column name="DATE_EDIT" type="DATETIME"/> + <column name="NAME" type="NVARCHAR(63)"> + <constraints nullable="false"/> + </column> + <column name="GROUPID" type="NVARCHAR(63)"> + <constraints nullable="false"/> + </column> + <column name="PROPKEY" type="VARCHAR(1024)"> + <constraints nullable="false"/> + </column> + <column name="PROPVAL" type="VARCHAR(1024)"/> + <column name="PROPVAL_CLOB" type="CLOB"/> + </createTable> + <createIndex indexName="IDX_ASYS_USERS_NAME" tableName="ASYS_USERS"> + <column name="NAME"/> + </createIndex> + <createIndex indexName="idx_asysusers_groupid" tableName="ASYS_USERS"> + <column name="GROUPID"/> + </createIndex> + </changeSet> + <changeSet id="4d1dc8cd-2bca-4501-9458-9178287a4f38" author="s.listl" dbms="!mssql,!mysql,!mariadb"> + <!--index can't be created on all dbms because of size restrictions--> + <createIndex indexName="idx_asysusers_propkey" tableName="ASYS_USERS"> + <column name="PROPKEY"/> + </createIndex> + <createIndex indexName="idx_asysusers_propval" tableName="ASYS_USERS"> + <column name="PROPVAL"/> + </createIndex> + </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index 2b11aae7aa4495b4546f82fbcd0a87510c329499..ba9127b544533d79800af6eb8a912daba6d1a7b2 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -8338,6 +8338,20 @@ </entityDependency> </dependencies> </entityFieldDb> + <entityFieldDb> + <name>RESPONSIBLE_CONTACT_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> </entityFields> </entityDb> <entityDb> @@ -14162,7 +14176,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <documentation></documentation> <title></title> <description></description> @@ -14488,7 +14502,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <documentation></documentation> <title></title> <description></description> @@ -14543,7 +14557,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <documentation></documentation> <title></title> <description></description> diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesorder/entityfields/object_rowid/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesorder/entityfields/object_rowid/customproperties/translate4log/property.js index aa7a1fe2a061e4d09e65eab58e503c37562cf5a6..7305220193d3d0f0504d588ccb1c70db27d139b2 100644 --- a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesorder/entityfields/object_rowid/customproperties/translate4log/property.js +++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesorder/entityfields/object_rowid/customproperties/translate4log/property.js @@ -12,4 +12,4 @@ var type = newSelect("OBJECT_TYPE") .where("SALESORDER.SALESORDERID", params.rowId) .cell(); -result.string(db.cell(ContextUtils.getNameSql(type, params.value))); +result.string(ContextUtils.getTitleByContext(type, params.value)); diff --git a/aliasDefinition/_____SYSTEMALIAS/_____SYSTEMALIAS.aod b/aliasDefinition/_____SYSTEMALIAS/_____SYSTEMALIAS.aod index 6f4f1b2dca5291f2a8a2ad8cbb2b4d47552c98ff..6407da1b96ade99cd89fd172be15282552aca01d 100644 --- a/aliasDefinition/_____SYSTEMALIAS/_____SYSTEMALIAS.aod +++ b/aliasDefinition/_____SYSTEMALIAS/_____SYSTEMALIAS.aod @@ -101,7 +101,7 @@ <scale v="0" /> <notNull v="true" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -174,7 +174,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -477,7 +477,7 @@ <scale v="9" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -490,7 +490,7 @@ <scale v="9" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -503,7 +503,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -516,7 +516,7 @@ <scale v="9" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -529,7 +529,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -568,7 +568,7 @@ <scale v="9" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -581,7 +581,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -620,7 +620,7 @@ <scale v="9" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -633,7 +633,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -700,12 +700,12 @@ <entityFieldDb> <name>DBID</name> <dbName></dbName> - <primaryKey v="true" /> + <primaryKey v="false" /> <columnType v="12" /> - <size v="191" /> + <size v="1023" /> <scale v="0" /> - <notNull v="true" /> - <isUnique v="true" /> + <notNull v="false" /> + <isUnique v="false" /> <index v="true" /> <title></title> <description></description> @@ -745,7 +745,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -778,13 +778,13 @@ <entityFieldDb> <name>ID</name> <dbName></dbName> - <primaryKey v="false" /> + <primaryKey v="true" /> <columnType v="1" /> <size v="36" /> <scale v="0" /> <notNull v="true" /> - <isUnique v="false" /> - <index v="false" /> + <isUnique v="true" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -883,7 +883,7 @@ <scale v="0" /> <notNull v="true" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -896,7 +896,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -930,7 +930,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -964,8 +964,8 @@ <name>DESCRIPTION</name> <dbName></dbName> <primaryKey v="false" /> - <columnType v="2005" /> - <size v="2147483647" /> + <columnType v="12" /> + <size v="255" /> <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> @@ -1020,8 +1020,8 @@ <size v="63" /> <scale v="0" /> <notNull v="true" /> - <isUnique v="false" /> - <index v="false" /> + <isUnique v="true" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -1034,7 +1034,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <title></title> <description></description> </entityFieldDb> @@ -1142,7 +1142,7 @@ <dbName></dbName> <primaryKey v="false" /> <columnType v="12" /> - <size v="15" /> + <size v="16" /> <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> @@ -1242,7 +1242,7 @@ <dbName></dbName> <primaryKey v="true" /> <columnType v="1" /> - <size v="36" /> + <size v="63" /> <scale v="0" /> <notNull v="true" /> <isUnique v="true" /> @@ -1393,7 +1393,7 @@ <dbName></dbName> <primaryKey v="true" /> <columnType v="1" /> - <size v="36" /> + <size v="63" /> <scale v="0" /> <notNull v="true" /> <isUnique v="true" /> @@ -1497,7 +1497,7 @@ <dbName></dbName> <primaryKey v="false" /> <columnType v="12" /> - <size v="63" /> + <size v="512" /> <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> @@ -1707,6 +1707,20 @@ <title></title> <description></description> </entityFieldDb> + <entityFieldDb> + <name>SUBCATEGORY</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="256" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> </entityFields> </entityDb> <entityDb> @@ -2049,8 +2063,8 @@ <name>ASSIGNABLE</name> <dbName></dbName> <primaryKey v="false" /> - <columnType v="4" /> - <size v="10" /> + <columnType v="5" /> + <size v="5" /> <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> @@ -2304,7 +2318,7 @@ <scale v="9" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <documentation></documentation> <title></title> <description></description> @@ -2615,8 +2629,8 @@ <size v="63" /> <scale v="0" /> <notNull v="true" /> - <isUnique v="true" /> - <index v="true" /> + <isUnique v="false" /> + <index v="false" /> <documentation></documentation> <title></title> <description></description> @@ -2624,11 +2638,11 @@ <entityFieldDb> <name>TAGNAME</name> <dbName></dbName> - <primaryKey v="false" /> + <primaryKey v="true" /> <columnType v="12" /> <size v="63" /> <scale v="0" /> - <notNull v="false" /> + <notNull v="true" /> <isUnique v="false" /> <index v="false" /> <documentation></documentation> @@ -2638,11 +2652,11 @@ <entityFieldDb> <name>TAGVALUE</name> <dbName></dbName> - <primaryKey v="false" /> + <primaryKey v="true" /> <columnType v="12" /> <size v="63" /> <scale v="0" /> - <notNull v="false" /> + <notNull v="true" /> <isUnique v="false" /> <index v="false" /> <documentation></documentation> diff --git a/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod b/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod index adb51ef4372f7731293b2be3e1ca1360a9bd83b5..9e61fe62da309c52a87c237fe3b5b2f0ebbec31a 100644 --- a/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod +++ b/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod @@ -38,6 +38,10 @@ <name>Task</name> <kind v="10077" /> </entityNode> + <entityNode> + <name>Favorite</name> + <kind v="10077" /> + </entityNode> </childNodes> </entityNode> </childNodes> diff --git a/entity/360Degree_entity/360Degree_entity.aod b/entity/360Degree_entity/360Degree_entity.aod index 62c86300ec6c74f84a6ac8fbb50ffd4daf7f5259..f527d3b4ebb438b7079feacf48dd25f0a4896d90 100644 --- a/entity/360Degree_entity/360Degree_entity.aod +++ b/entity/360Degree_entity/360Degree_entity.aod @@ -15,6 +15,7 @@ </siblings> <grantUpdate v="false" /> <grantDelete v="false" /> + <titlePlural>Links</titlePlural> <recordContainer>jdito</recordContainer> <entityFields> <entityProvider> @@ -25,6 +26,7 @@ </entityField> <entityField> <name>TITLE</name> + <title>Title</title> <linkedContextProcess>%aditoprj%/entity/360Degree_entity/entityfields/title/linkedContextProcess.js</linkedContextProcess> </entityField> <entityParameter> @@ -71,11 +73,10 @@ <entityField> <name>ENTITY_NAME</name> <title>Module</title> - <groupable v="true" /> <valueProcess>%aditoprj%/entity/360Degree_entity/entityfields/entity_name/valueProcess.js</valueProcess> </entityField> <entityField> - <name>DATE</name> + <name>DATE_NEW</name> <title>Date</title> <contentType>DATE</contentType> <resolution>DAY</resolution> @@ -105,12 +106,6 @@ </entityParameter> </children> </entityProvider> - <entityField> - <name>YEAR</name> - <title>Year</title> - <groupable v="true" /> - <valueProcess>%aditoprj%/entity/360Degree_entity/entityfields/year/valueProcess.js</valueProcess> - </entityField> <entityActionGroup> <name>newModule</name> <title>New module</title> @@ -166,13 +161,6 @@ <contentType>IMAGE</contentType> <valueProcess>%aditoprj%/entity/360Degree_entity/entityfields/icon/valueProcess.js</valueProcess> </entityField> - <entityField> - <name>ACTIVE</name> - <title>Active</title> - <contentType>TEXT</contentType> - <groupable v="true" /> - <dropDownProcess>%aditoprj%/entity/360Degree_entity/entityfields/active/dropDownProcess.js</dropDownProcess> - </entityField> <entityParameter> <name>BaseContextId_param</name> <expose v="true" /> @@ -185,6 +173,25 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityField> + <name>GROUP</name> + <title>Group</title> + <groupable v="true" /> + </entityField> + <entityField> + <name>DESCRIPTION</name> + <title>Description</title> + </entityField> + <entityField> + <name>YEAR</name> + <title>Year</title> + <groupable v="true" /> + </entityField> + <entityField> + <name>ACTIVE</name> + <title>Active</title> + <dropDownProcess>%aditoprj%/entity/360Degree_entity/entityfields/active/dropDownProcess.js</dropDownProcess> + </entityField> </entityFields> <recordContainers> <jDitoRecordContainer> @@ -203,20 +210,32 @@ <jDitoRecordFieldMapping> <name>TARGET_CONTEXT.value</name> </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>TARGET_CONTEXT.displayValue</name> + </jDitoRecordFieldMapping> <jDitoRecordFieldMapping> <name>TITLE.value</name> </jDitoRecordFieldMapping> <jDitoRecordFieldMapping> - <name>DATE.value</name> + <name>DESCRIPTION.value</name> </jDitoRecordFieldMapping> <jDitoRecordFieldMapping> - <name>ACTIVE.value</name> + <name>DATE_NEW.value</name> <isFilterable v="true" /> - <isLookupFilter v="true" /> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>YEAR.value</name> </jDitoRecordFieldMapping> <jDitoRecordFieldMapping> <name>ENTITY_NAME.value</name> </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>GROUP.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ACTIVE.value</name> + <isFilterable v="true" /> + </jDitoRecordFieldMapping> </recordFieldMappings> </jDitoRecordContainer> </recordContainers> diff --git a/entity/360Degree_entity/documentation.adoc b/entity/360Degree_entity/documentation.adoc index d14c31a7c939c89fb3ace5ae20758bb83cb2f522..b2ad150c07864327f864c6c179b28caf1a37d285 100644 --- a/entity/360Degree_entity/documentation.adoc +++ b/entity/360Degree_entity/documentation.adoc @@ -3,9 +3,9 @@ The 360Degree_entity shows the Connection between data models. The entity has two providers for persons and organizations. -The 360Degree_entity shows direct connections, don´t be confused with the ObjectRelation_entity. +The 360Degree_entity shows direct connections, don´t be confused with the ObjectRelation_entity. -== Adding new modules to the 360° view +== Adding new modules to the 360° view You may want to display more modules within the 360degree view (for example after creating and implemeting your own module). .An Example: @@ -14,6 +14,23 @@ display it in the 360degree view. Heres is a list of what you need to do whenever you want to do this: -- Add an entry in the function `ContextUtils.getSelectMap` which is located in the `Context_lib` (check out the documentation there for further details). _Speaking of the example above you need to define there how to retrieve the t-shirt-data for a contact_ +- At first you have to fill/add certain Fields/Processes in your new Context. + - Add (These have to be written exactly like that, if not already existing): + - CONTACT_ID, this Field has to contain a CONTACTID. That will be used to find the Connection to your Person or your Organisation. + - DATE_NEW, this Field has to contain a Date as a Long Value. That will be used as the Date Value you can see in the Timeline View-Template. + - ACTIVE, in this Field you can specify which Datasets are active or not. You have to declare that in the Value Expression as a Case-When due to the Filter + - Fill (these can be filled in the specific Entity as a Process) + - #CONTENTTITLE, this will be the main display Text and the blue Link + - #CONTENTDESCRIPTION, this will be the smaller, mostly longer, Text beneath the #CONTENTTITLE + +- Add an elemnt (with the name of the context you want to add) in the process of the `ObjectType_param` in the *corresponding provider* which is located in the `360Degree_entity`. _We would extend the JSON-Object which is returned in the `PersonObjects`-provider by the name of our t-shirt-context: "TShirt" in our example +- +- In that JSON-Object can also add some Configuration Elements to change the results. + - setGroupBy: here you can declare a DB-Column that will be used as the new group by of that context. A good example is Order. We want to group by the Ordertype so we have to declare ORDERTYPE as our groupBy. + - If your DB-Value is related to a Keyword you also have to use groupByKeyword and add the Container as Value -- Add an entry (with the name of the context you want to add) in the process of the `ObjectType_param` in the *corresponding provider* which is located in the `360Degree_entity`. _We would extend the array which is returned in the `PersonObjects`-provider by the name of our t-shirt-context: "TShirt" in our example_ \ No newline at end of file +- If you have a Connection of 1:N in your Database Schema (like Activity and ActivityLink) you have to add specific Properties in your Context Object. Lets take ActivityLink as a Example. + - subContext: the Name of the "Link"-Context -> ActivityLink + - childField: The Field where the LinkID to your Parent is stored -> ACTIVITY_ID + - parentField: The field in your Parent Context where your Connection to your Child is stored -> ACTIVITYID + - contactIdField: The Field in the Link Context where your Contactid is stored -> OBJECT_ROWID \ No newline at end of file diff --git a/entity/360Degree_entity/entityfields/newmodule/children/newcampaignparticipant/stateProcess.js b/entity/360Degree_entity/entityfields/newmodule/children/newcampaignparticipant/stateProcess.js index 353aa9f3676bc0c8d4a823b2944a5794acbb4677..fbdfd3fd2e124194d93b908f33d2b56bffbf1bee 100644 --- a/entity/360Degree_entity/entityfields/newmodule/children/newcampaignparticipant/stateProcess.js +++ b/entity/360Degree_entity/entityfields/newmodule/children/newcampaignparticipant/stateProcess.js @@ -7,11 +7,11 @@ if (contextList) { var found = false; - contextList.forEach(function (context) + for(context in contextList) { if(context == "Campaign") found = true; - }); + } if(found) result.string(neon.COMPONENTSTATE_AUTO); else diff --git a/entity/360Degree_entity/entityfields/newmodule/children/newcontract/stateProcess.js b/entity/360Degree_entity/entityfields/newmodule/children/newcontract/stateProcess.js index f1cfb310581815a99377b7da0152c0483f24d9d5..64c597b2e188312d6589a3d1bbf53cb00ff83e95 100644 --- a/entity/360Degree_entity/entityfields/newmodule/children/newcontract/stateProcess.js +++ b/entity/360Degree_entity/entityfields/newmodule/children/newcontract/stateProcess.js @@ -6,11 +6,11 @@ var contextList = JSON.parse(vars.getString("$param.ObjectType_param")); if (contextList) { var found = false; - contextList.forEach(function (context) + for(context in contextList) { if(context == "Contract") found = true; - }); + } if(found) result.string(neon.COMPONENTSTATE_AUTO); else diff --git a/entity/360Degree_entity/entityfields/newmodule/children/newoffer/stateProcess.js b/entity/360Degree_entity/entityfields/newmodule/children/newoffer/stateProcess.js index 02a2b07b699e399fed77114a8841d76b2d0d35b1..ce3eb11c9bd8dba37fe4bf96fd936fd9fec4f843 100644 --- a/entity/360Degree_entity/entityfields/newmodule/children/newoffer/stateProcess.js +++ b/entity/360Degree_entity/entityfields/newmodule/children/newoffer/stateProcess.js @@ -6,11 +6,11 @@ var contextList = JSON.parse(vars.getString("$param.ObjectType_param")); if (contextList) { var found = false; - contextList.forEach(function (context) + for(context in contextList) { if(context == "Offer") found = true; - }); + } if(found) result.string(neon.COMPONENTSTATE_AUTO); else diff --git a/entity/360Degree_entity/entityfields/newmodule/children/neworder/stateProcess.js b/entity/360Degree_entity/entityfields/newmodule/children/neworder/stateProcess.js index 1c2b2b9123cb9512962e66ccf03bc2c7fecef0ab..6b9ec8164168c9286b1646b88d8f18e83708d833 100644 --- a/entity/360Degree_entity/entityfields/newmodule/children/neworder/stateProcess.js +++ b/entity/360Degree_entity/entityfields/newmodule/children/neworder/stateProcess.js @@ -6,11 +6,11 @@ var contextList = JSON.parse(vars.getString("$param.ObjectType_param")); if (contextList) { var found = false; - contextList.forEach(function (context) + for(context in contextList) { if(context == "Order") found = true; - }); + } if(found) result.string(neon.COMPONENTSTATE_AUTO); else diff --git a/entity/360Degree_entity/entityfields/newmodule/children/newsalesproject/stateProcess.js b/entity/360Degree_entity/entityfields/newmodule/children/newsalesproject/stateProcess.js index f23023f7d177f0f5d7eec62b42371db2b0289173..6a18dc9adfd19a69b749c88e9282cfb186e35d5c 100644 --- a/entity/360Degree_entity/entityfields/newmodule/children/newsalesproject/stateProcess.js +++ b/entity/360Degree_entity/entityfields/newmodule/children/newsalesproject/stateProcess.js @@ -7,11 +7,11 @@ if (contextList) { var found = false; - contextList.forEach(function (context) + for(context in contextList) { if(context == "Salesproject") found = true; - }); + } if(found) result.string(neon.COMPONENTSTATE_AUTO); else diff --git a/entity/360Degree_entity/entityfields/organisationobjects/children/objecttype_param/valueProcess.js b/entity/360Degree_entity/entityfields/organisationobjects/children/objecttype_param/valueProcess.js index 86503dcd7f316c24dd3b7e31d296e35802db29a4..9b0fe874baa54a8604d5955087be959dfb644563 100644 --- a/entity/360Degree_entity/entityfields/organisationobjects/children/objecttype_param/valueProcess.js +++ b/entity/360Degree_entity/entityfields/organisationobjects/children/objecttype_param/valueProcess.js @@ -3,4 +3,21 @@ import("system.result"); //No campaign, since a campaign can only be linked with a person. //Even when all entries of persons are displayed in the organisation_entity: It's still nonsense to display campaigns per status. -result.object(["Salesproject", "Offer", "Order", "Contract", "SupportTicket"]); \ No newline at end of file + +var res = { + "Salesproject": {}, + "Offer": {}, + "Order": { + "setGroupBy":"ORDERTYPE", + "groupByKeyword":"OrderType" + }, + "Contract": {}, + "SupportTicket": { + "subContext":"TaskLink", + "childField":"TASK_ID", + "parentField":"TASK_TASKID", + "contactIdField":"OBJECT_ROWID" + } +} + +result.string(JSON.stringify(res)) \ No newline at end of file diff --git a/entity/360Degree_entity/entityfields/personobjects/children/objecttype_param/valueProcess.js b/entity/360Degree_entity/entityfields/personobjects/children/objecttype_param/valueProcess.js index 51c40eed05ba103ae4347347277aea4e2bad20a3..0764eff7f7bb307932d6c09366ff99f6431a1114 100644 --- a/entity/360Degree_entity/entityfields/personobjects/children/objecttype_param/valueProcess.js +++ b/entity/360Degree_entity/entityfields/personobjects/children/objecttype_param/valueProcess.js @@ -1,4 +1,14 @@ import("system.vars"); import("system.result"); -result.object(["Offer", "Contract", "Campaign", "Order", "SupportTicket"]); \ No newline at end of file +var res = { + "Offer": {}, + "Order": { + "setGroupBy":"ORDERTYPE" + }, + "Contract": {}, + "SupportTicket": {}, + "Campaign": {} +} + +result.string(JSON.stringify(res)) \ No newline at end of file diff --git a/entity/360Degree_entity/entityfields/year/valueProcess.js b/entity/360Degree_entity/entityfields/year/valueProcess.js deleted file mode 100644 index c21dcc8cde6f3f27028dbb1844895cc55f093ff8..0000000000000000000000000000000000000000 --- a/entity/360Degree_entity/entityfields/year/valueProcess.js +++ /dev/null @@ -1,6 +0,0 @@ -import("system.datetime"); -import("system.result"); -import("system.vars"); - -var dateVal = vars.get("$field.DATE"); -result.string(datetime.toDate(dateVal, "yyyy")); \ No newline at end of file diff --git a/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js b/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js index 3014803809e5526a81241581d3f12bc965edf216..f6417bb26a778fd4df642ffb42f2f127742c3905 100644 --- a/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js @@ -1,36 +1,20 @@ -import("system.util"); -import("system.db"); -import("system.vars"); +import("system.datetime"); +import("system.logging"); +import("Util_lib"); +import("system.translate"); import("system.result"); +import("system.vars"); import("Context_lib"); -import("system.translate"); +import("Keyword_lib"); -if (vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param") && vars.exists("$param.ObjectRowId_param") && vars.get("$param.ObjectRowId_param")) -{ - var active; - var selectMap = ContextUtils.getSelectMap(); - if(vars.exists("$local.filter") && vars.get("$local.filter") ) - { - var filter = vars.get("$local.filter"); - if (filter.filter) - if(filter.filter.childs != null && filter.filter.childs.length > 0) - { - filter.filter.childs.forEach(function(child) - { - if(child.name === "ACTIVE") - active = child.key == 'true'; - }); - } - } - - var contextList = JSON.parse(vars.getString("$param.ObjectType_param")); - var contactId = vars.get("$param.ObjectRowId_param"); - var idValues; - if (vars.exists("$local.idvalues")) - idValues = vars.get("$local.idvalues"); - - var res = _get360Data(selectMap, contactId, contextList, active, idValues); - result.object(res); + +if (vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param") + && vars.exists("$param.ObjectRowId_param") && vars.get("$param.ObjectRowId_param")) +{ + var contextList = JSON.parse(vars.get("$param.ObjectType_param")); + var contactId = JSON.parse(vars.get("$param.ObjectRowId_param")); + var data = _get360Data(contactId, contextList); + result.object(data); } else { @@ -38,79 +22,65 @@ else } /** - * load all data for the 360Degree tree. - * @param {Object} pSelectMap the select map (result of ContextUtils.getSelectMap()) - * @param {String[]} pContactId the Contactid the 360 Degree tree should be loaded for - * @param {String[]} pContextList list of contexts to load. Note that subcontexts use their own list, defined in ContextUtils - * @param {Boolean} [pActive=undefined] if not undefined: it select only for active / inactive state - * @param {Array} [pUids=undefined] uids of the 360° entity that are used for filtering, each rowId needs the format: - * {id: "«rowid»", type: "«context id»"} + * collects all data for the 360Degree tree. + * @param {String} pContactId, the main Contactid that will be used for the Connections + * @param {String[]} pContextList, a list of Contexts that should be displayed * * @return {String[][]} the resulting data */ -function _get360Data(pSelectMap, pContactId, pContextList, pActive, pUids) +function _get360Data(pContactId, pContextList) { - //if there are uids for filtering, group them per context: - var uidContextMap = new Map();//Map where key is the type (contextname) and value is an array of the rowIds for that type - if (pUids) - { - pUids.forEach(function (uid){ - uid = JSON.parse(uid); - if (uidContextMap.has(uid.type)) - uidContextMap.get(uid.type).push(uid.id); - else - uidContextMap.set(uid.type, [uid.id]); - }); - } - var resultList = []; - pContextList.forEach(function (context) + var filter = vars.get("$sys.filter"); + for(var context in pContextList) { - var rowIds; - if (pUids) - { - //when a Uid-filter exists, but there is no context for filtering we can skip that context, - //otherwise we need to filter for the found row ids of that context - if (!uidContextMap.has(context)) - return; - else - rowIds = uidContextMap.get(context); - } - var data = db.table(ContextUtils.getContextDataSql(context, JSON.parse(pContactId), true, pActive, true, true, rowIds)); - data.forEach(function (row) + var group = context; + if(pContextList[context].hasOwnProperty("setGroupBy") && pContextList[context].hasOwnProperty("groupByKeyword")) + var groupKeyword = Utils.objectFromMap(new Map(KeywordUtils.getEntryNamesAndIdsByContainer(pContextList[context]["groupByKeyword"]))); + + var res = ContextUtils.getContextDataViaReadEntity(context, pContextList[context], filter, pContactId); + if(res.length > 0) { - var active; - if(pActive != undefined) //ACTIVE - active = translate.text(pActive); - else + res.forEach(function (row) { - if(pSelectMap[context].activeStates && pSelectMap[context].activeStates.indexOf(row[3]) > -1) - active = translate.text("true"); - else - active = translate.text("false"); - } - - var groupBy = row[4]; - if(groupBy == "") - groupBy = ContextUtils.getEntityTitle(context, true); - - var uid = JSON.stringify({id: row[0], type: context}); - resultList.push([ - uid, // UID - row[0], // TARGET_ID - context, // TARGET_CONTEXT - row[1], // TITLE - row[2], //DATE - active, - groupBy - ]); - }); - }); - - resultList.sort(function (a,b) { - if (a[4] < b[4]) return 1; - if (a[4] > b[4]) return -1; - return 0; - }) + var uid = JSON.stringify({ + "id": row["#UID"], + "type": context + }); + var targetid = row["#UID"]; + var title = row["#CONTENTTITLE"]; + var description = row["#CONTENTDESCRIPTION"]; + var dataDate = row["DATE_NEW"]; + var active = row["ACTIVE"]; + if(pContextList[context].hasOwnProperty("setGroupBy")) + group = row[pContextList[context]["setGroupBy"]] + + + if(pContextList[context].hasOwnProperty("setGroupBy")) + { + if( pContextList[context].hasOwnProperty("groupByKeyword") && groupKeyword) + group = groupKeyword[row[pContextList[context]["setGroupBy"]]] + else + group = row[pContextList[context]["setGroupBy"]] + } + + resultList.push([ + uid, // UID + targetid, // TARGET_ID + context, // TARGET_CONTEXT + translate.text(pContextList[context]), // TARGET_CONTEXT.displayValue + title, // TITLE + description, // DESCRIPTION + dataDate, // DATE + datetime.toDate(dataDate, "yyyy"), // YEAR + ContextUtils.getEntity(context), // ENTITY_NAME + translate.text(group), // GROUP + active // ACTIVE + ]); + }); + } + } + var sortArr = [9, false] + resultList = ArrayUtils.sortMulti(resultList, sortArr) return resultList; } \ No newline at end of file diff --git a/entity/ActivityLink_entity/entityfields/object_rowid/displayValueProcess.js b/entity/ActivityLink_entity/entityfields/object_rowid/displayValueProcess.js index 8b080bceea92c146a676b0f33cc7cb87d4e86b9d..95c4eea5367140dc2d81e470ba0607adf52f07c1 100644 --- a/entity/ActivityLink_entity/entityfields/object_rowid/displayValueProcess.js +++ b/entity/ActivityLink_entity/entityfields/object_rowid/displayValueProcess.js @@ -7,5 +7,5 @@ import("Context_lib"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$field.OBJECT_ROWID")) { result.string(""); } else if (vars.exists("$field.OBJECT_TYPE") && vars.get("$field.OBJECT_TYPE")) { - result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID")))); + result.string(ContextUtils.getTitleByContext(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID"))); } \ No newline at end of file diff --git a/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js b/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js index 8c0ab0e94b135d4b1b475ecbbde7900cd3fd109e..62c7fcc7146f0ddc96c32458381a18507a831252 100644 --- a/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js +++ b/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js @@ -5,5 +5,4 @@ import("Sql_lib"); var cond = newWhereIfSet("ACTIVITYLINK.ACTIVITY_ID", "$param.ActivityId_param", SqlBuilder.EQUAL()); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Activity_entity/Activity_entity.aod b/entity/Activity_entity/Activity_entity.aod index fae8253b6fe8500354a5fe462f88dd401dcb0dd2..ddb1971da5fe2dd72dba504187bbf76b890f6bf9 100644 --- a/entity/Activity_entity/Activity_entity.aod +++ b/entity/Activity_entity/Activity_entity.aod @@ -157,6 +157,7 @@ <title>Date (Month)</title> <contentType>TEXT</contentType> <groupable v="true" /> + <displayValueProcess>%aditoprj%/entity/Activity_entity/entityfields/entrymonth/displayValueProcess.js</displayValueProcess> <onValueChangeTypes> <element>MASK</element> <element>PROCESS</element> diff --git a/entity/Activity_entity/entityfields/msteams/children/createnewchatactivity/onActionProcess.js b/entity/Activity_entity/entityfields/msteams/children/createnewchatactivity/onActionProcess.js deleted file mode 100644 index 6840e66a0bf624bd35c5e57e54f8c17dfd3ba039..0000000000000000000000000000000000000000 --- a/entity/Activity_entity/entityfields/msteams/children/createnewchatactivity/onActionProcess.js +++ /dev/null @@ -1,6 +0,0 @@ -import("system.vars"); -import("system.neon"); - -neon.openContext("MSTTeamChat", null, null, neon.OPERATINGSTATE_NEW, { - "ROWID_param" : vars.get("$param.RowId_param") -}); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/msteams/children/createnewchatactivity/stateProcess.js b/entity/Activity_entity/entityfields/msteams/children/createnewchatactivity/stateProcess.js deleted file mode 100644 index 0b93d5c410be5db4947a2c77b283d70b307921a1..0000000000000000000000000000000000000000 --- a/entity/Activity_entity/entityfields/msteams/children/createnewchatactivity/stateProcess.js +++ /dev/null @@ -1,23 +0,0 @@ -import("system.vars"); -import("system.neon"); -import("system.result"); -import("Sql_lib"); - -var teamId = newSelect("MST_TEAMID") - .from("MST_TEAM") - .where("MST_TEAM.OBJECT_ROWID", vars.get("$param.RowId_param")) - .cell(); - -var isArchived = newSelect("IS_ARCHIVED") - .from("MST_TEAM") - .where("MST_TEAM.OBJECT_ROWID", vars.get("$param.RowId_param")) - .cell(); - -if (teamId == "" || isArchived == 1) -{ - result.string(neon.COMPONENTSTATE_INVISIBLE); -} -else -{ - result.string(neon.COMPONENTSTATE_EDITABLE); -} \ No newline at end of file diff --git a/entity/Activity_entity/recordcontainers/db/conditionProcess.js b/entity/Activity_entity/recordcontainers/db/conditionProcess.js index 0b11a5004b58c4183c958973a80043c56bcac66f..950fcd1f1dc1877ea33c1de0d3c20e92fd9e654a 100644 --- a/entity/Activity_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Activity_entity/recordcontainers/db/conditionProcess.js @@ -59,5 +59,4 @@ if (Utils.toBoolean(vars.get("$param.OnlyInnate_param"))) condition.andIfSet("ACTIVITY.PARENT_ID", "$param.ParentId_param"); condition.andIfSet("ACTIVITY.PARENT_CONTEXT", "$param.ParentContext_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(condition.toString()); \ No newline at end of file diff --git a/entity/AddressType_entity/recordcontainers/db/conditionProcess.js b/entity/AddressType_entity/recordcontainers/db/conditionProcess.js index 19180612ce1d42532dc6f3807b84884e8469b4ad..6e937ecf4c22f7a5bb99a4320ddb55e7a32590f0 100644 --- a/entity/AddressType_entity/recordcontainers/db/conditionProcess.js +++ b/entity/AddressType_entity/recordcontainers/db/conditionProcess.js @@ -18,5 +18,4 @@ if (usageFilter) SqlBuilder.IN()) } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Address_entity/Address_entity.aod b/entity/Address_entity/Address_entity.aod index b1cf501940c85a3f845264d1a6a8bca878db1948..c6e2d95af9f9ed239aa78778b427aa164d21695c 100644 --- a/entity/Address_entity/Address_entity.aod +++ b/entity/Address_entity/Address_entity.aod @@ -90,14 +90,6 @@ <entityProvider> <name>OrganisationAddresses</name> <documentation>%aditoprj%/entity/Address_entity/entityfields/organisationaddresses/documentation.adoc</documentation> - <dependencies> - <entityDependency> - <name>b484b43c-16f6-4875-9787-f0813dd200cb</name> - <entityName>Organisation_entity</entityName> - <fieldName>Addresses</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>ContactType_param</name> @@ -118,6 +110,14 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>b484b43c-16f6-4875-9787-f0813dd200cb</name> + <entityName>Organisation_entity</entityName> + <fieldName>Addresses</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityParameter> <name>ContactId_param</name> @@ -128,20 +128,6 @@ <entityProvider> <name>ContactAddresses</name> <documentation>%aditoprj%/entity/Address_entity/entityfields/contactaddresses/documentation.adoc</documentation> - <dependencies> - <entityDependency> - <name>efdb2f19-ab41-4f49-941a-843610e2b31b</name> - <entityName>Person_entity</entityName> - <fieldName>PersAddresses</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>aecd30a8-b80e-42c5-be09-3042b75a3fa2</name> - <entityName>Contact_entity</entityName> - <fieldName>ContactAddresses</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>ContactType_param</name> @@ -162,6 +148,20 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>efdb2f19-ab41-4f49-941a-843610e2b31b</name> + <entityName>Person_entity</entityName> + <fieldName>PersAddresses</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>aecd30a8-b80e-42c5-be09-3042b75a3fa2</name> + <entityName>Contact_entity</entityName> + <fieldName>ContactAddresses</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityProvider> <name>#PROVIDER</name> @@ -178,14 +178,6 @@ <name>OrganisationAddressesByContact</name> <documentation>%aditoprj%/entity/Address_entity/entityfields/organisationaddressesbycontact/documentation.adoc</documentation> <titlePlural>Company Addresses</titlePlural> - <dependencies> - <entityDependency> - <name>388f6ad3-b817-4dc0-a5d5-a41eec485357</name> - <entityName>Person_entity</entityName> - <fieldName>OrgAddresses</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>ContactType_param</name> @@ -198,6 +190,14 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>388f6ad3-b817-4dc0-a5d5-a41eec485357</name> + <entityName>Person_entity</entityName> + <fieldName>OrgAddresses</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityField> <name>IS_STANDARD</name> @@ -223,26 +223,6 @@ <entityProvider> <name>OrganisationAndContactAddresses</name> <documentation>%aditoprj%/entity/Address_entity/entityfields/organisationandcontactaddresses/documentation.adoc</documentation> - <dependencies> - <entityDependency> - <name>4d7e3b3a-abba-4429-9f1e-18e11788c0f2</name> - <entityName>Person_entity</entityName> - <fieldName>ContactAndOrganisationAddresses</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>daa41953-8e95-46f2-b08a-6c843ab87985</name> - <entityName>Offer_entity</entityName> - <fieldName>PossibleAddresses</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>2f162626-bd99-4e2a-b9cf-e95864d9ed0e</name> - <entityName>Order_entity</entityName> - <fieldName>PossibleAddresses</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>DefaultAddressId_param</name> @@ -264,6 +244,26 @@ <expose v="true" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>4d7e3b3a-abba-4429-9f1e-18e11788c0f2</name> + <entityName>Person_entity</entityName> + <fieldName>ContactAndOrganisationAddresses</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>daa41953-8e95-46f2-b08a-6c843ab87985</name> + <entityName>Offer_entity</entityName> + <fieldName>PossibleAddresses</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>2f162626-bd99-4e2a-b9cf-e95864d9ed0e</name> + <entityName>Order_entity</entityName> + <fieldName>PossibleAddresses</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityParameter> <name>OrganisationId_param</name> @@ -272,17 +272,17 @@ </entityParameter> <entityConsumer> <name>KeywordAddressTypes</name> - <dependency> - <name>dependency</name> - <entityName>AddressType_entity</entityName> - <fieldName>ByCategory</fieldName> - </dependency> <children> <entityParameter> <name>UsageFilter_param</name> <valueProcess>%aditoprj%/entity/Address_entity/entityfields/keywordaddresstypes/children/usagefilter_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>AddressType_entity</entityName> + <fieldName>ByCategory</fieldName> + </dependency> </entityConsumer> <entityField> <name>USER_NEW</name> @@ -309,11 +309,6 @@ </entityField> <entityConsumer> <name>ZipValidation</name> - <dependency> - <name>dependency</name> - <entityName>AddressValidation_entity</entityName> - <fieldName>ZipValidaton</fieldName> - </dependency> <children> <entityParameter> <name>Country_param</name> @@ -324,14 +319,14 @@ <valueProcess>%aditoprj%/entity/Address_entity/entityfields/zipvalidation/children/currentvalue_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>CityValidation</name> <dependency> <name>dependency</name> <entityName>AddressValidation_entity</entityName> - <fieldName>CityValidation</fieldName> + <fieldName>ZipValidaton</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>CityValidation</name> <children> <entityParameter> <name>CurrentValue_param</name> @@ -342,6 +337,11 @@ <valueProcess>%aditoprj%/entity/Address_entity/entityfields/cityvalidation/children/country_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>AddressValidation_entity</entityName> + <fieldName>CityValidation</fieldName> + </dependency> </entityConsumer> <entityField> <name>AddressSearch</name> @@ -357,11 +357,6 @@ </entityField> <entityConsumer> <name>FullAddressValidation</name> - <dependency> - <name>dependency</name> - <entityName>AddressValidation_entity</entityName> - <fieldName>FullAddressValidation</fieldName> - </dependency> <children> <entityParameter> <name>CurrentValue_param</name> @@ -372,14 +367,14 @@ <valueProcess>%aditoprj%/entity/Address_entity/entityfields/fulladdressvalidation/children/country_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>StreetValidation</name> <dependency> <name>dependency</name> <entityName>AddressValidation_entity</entityName> - <fieldName>StreetValidation</fieldName> + <fieldName>FullAddressValidation</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>StreetValidation</name> <children> <entityParameter> <name>City_param</name> @@ -394,6 +389,11 @@ <valueProcess>%aditoprj%/entity/Address_entity/entityfields/streetvalidation/children/currentvalue_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>AddressValidation_entity</entityName> + <fieldName>StreetValidation</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>ShowDsgvoMessage_param</name> diff --git a/entity/Address_entity/recordcontainers/db/conditionProcess.js b/entity/Address_entity/recordcontainers/db/conditionProcess.js index a938934f9b9642e9935641e62b1a9f8d957e1fbc..24b457e53de03c851e12a95bc95830c987a5f0f2 100644 --- a/entity/Address_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Address_entity/recordcontainers/db/conditionProcess.js @@ -4,13 +4,9 @@ import("system.db"); import("Sql_lib"); var cond = newWhere() + .andIfSet("ADDRESS.CONTACT_ID", "$param.ContactId_param"); -if (vars.exists("$param.ContactId_param")) // Todo: shouldn't be needed, but sometimes in the filter view of pers / org the param doesn't exist?? --> It should be null if it's not set... - cond.andIfSet("ADDRESS.CONTACT_ID", "$param.ContactId_param"); - -if (vars.exists("$param.OrganisationId_param")) // Todo: shouldn't be needed, but sometimes in the filter view of pers / org the param doesn't exist??' --> It should be null if it's not set... - var organisationId = vars.get("$param.OrganisationId_param"); - +var organisationId = vars.get("$param.OrganisationId_param"); if (organisationId) { var organisationContactId = newSelect("CONTACT.CONTACTID") @@ -21,5 +17,4 @@ if (organisationId) cond.orIfSet("ADDRESS.CONTACT_ID", organisationContactId); } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/AnyContact_entity/recordcontainers/db/conditionProcess.js b/entity/AnyContact_entity/recordcontainers/db/conditionProcess.js index a793d04a1b1ac773414d333e4ccc4e645b1df960..e063f85110e206b097eb26a9bed17fc0b948eabd 100644 --- a/entity/AnyContact_entity/recordcontainers/db/conditionProcess.js +++ b/entity/AnyContact_entity/recordcontainers/db/conditionProcess.js @@ -32,5 +32,4 @@ var contactIds = vars.exists("$param.ContactIds_param") && vars.get("$param.Cont if (contactIds) cond.andIfSet("CONTACT.CONTACTID", JSON.parse(contactIds), SqlBuilder.IN()); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/AppointmentLink_entity/entityfields/objectid/displayValueProcess.js b/entity/AppointmentLink_entity/entityfields/objectid/displayValueProcess.js index e95adef18a9cb958af3277c59ad305d5d4a786b6..a44f299d8aff2125db0785b0a333771b0af21cd5 100644 --- a/entity/AppointmentLink_entity/entityfields/objectid/displayValueProcess.js +++ b/entity/AppointmentLink_entity/entityfields/objectid/displayValueProcess.js @@ -7,5 +7,5 @@ import("Context_lib"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$field.OBJECTID")) { result.string(""); } else if (vars.exists("$field.OBJECTTYPE") && vars.get("$field.OBJECTTYPE")) { - result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECTTYPE"), vars.get("$field.OBJECTID")))); + result.string(ContextUtils.getTitleByContext(vars.get("$field.OBJECTTYPE"), vars.get("$field.OBJECTID"))); } \ No newline at end of file diff --git a/entity/AppointmentLink_entity/recordcontainers/db/conditionProcess.js b/entity/AppointmentLink_entity/recordcontainers/db/conditionProcess.js index b9a9cafdcba80e3ff11803906bddf17e2423c3b3..b44b0652bd7cf463b313517ee246185226d339e4 100644 --- a/entity/AppointmentLink_entity/recordcontainers/db/conditionProcess.js +++ b/entity/AppointmentLink_entity/recordcontainers/db/conditionProcess.js @@ -4,5 +4,4 @@ import("Sql_lib"); var cond = newWhereIfSet("AB_APPOINTMENTLINK.APPOINTMENT_ID", "$param.AppointmentId_param") -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/AttributeRelation_entity/AttributeRelation_entity.aod b/entity/AttributeRelation_entity/AttributeRelation_entity.aod index 4e5c98f9dece6d09e3bc547dc137db746490724b..6a92d5391d81f8fb81e4968db71c7f66ee112989 100644 --- a/entity/AttributeRelation_entity/AttributeRelation_entity.aod +++ b/entity/AttributeRelation_entity/AttributeRelation_entity.aod @@ -34,6 +34,13 @@ <entityProvider> <name>TreeProvider</name> <documentation>%aditoprj%/entity/AttributeRelation_entity/entityfields/treeprovider/documentation.adoc</documentation> + <children> + <entityParameter> + <name>GetTree_param</name> + <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/treeprovider/children/gettree_param/valueProcess.js</valueProcess> + <expose v="false" /> + </entityParameter> + </children> <dependencies> <entityDependency> <name>e0a7a4bc-ec7f-4f09-9b94-cbeb328cd7b8</name> @@ -96,13 +103,6 @@ <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>GetTree_param</name> - <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/treeprovider/children/gettree_param/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - </children> </entityProvider> <entityField> <name>AB_ATTRIBUTE_ID</name> @@ -132,11 +132,6 @@ </entityField> <entityConsumer> <name>SpecificAttribute</name> - <dependency> - <name>dependency</name> - <entityName>Attribute_entity</entityName> - <fieldName>SpecificAttribute</fieldName> - </dependency> <children> <entityParameter> <name>ObjectType_param</name> @@ -155,6 +150,11 @@ <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/specificattribute/children/themeobjectrowid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Attribute_entity</entityName> + <fieldName>SpecificAttribute</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>GetTree_param</name> @@ -165,6 +165,12 @@ <entityProvider> <name>AttributeRelations</name> <documentation>%aditoprj%/entity/AttributeRelation_entity/entityfields/attributerelations/documentation.adoc</documentation> + <children> + <entityParameter> + <name>GetTree_param</name> + <expose v="false" /> + </entityParameter> + </children> <dependencies> <entityDependency> <name>69560cc2-d92a-453c-9e64-fb712a538c4f</name> @@ -239,12 +245,6 @@ <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>GetTree_param</name> - <expose v="false" /> - </entityParameter> - </children> </entityProvider> <entityField> <name>DATE_EDIT</name> @@ -312,11 +312,6 @@ </entityField> <entityConsumer> <name>Objects</name> - <dependency> - <name>dependency</name> - <entityName>ObjectProxy_entity</entityName> - <fieldName>FilteredObjects</fieldName> - </dependency> <children> <entityParameter> <name>Entity_param</name> @@ -327,6 +322,11 @@ <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/objects/children/filter_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>ObjectProxy_entity</entityName> + <fieldName>FilteredObjects</fieldName> + </dependency> </entityConsumer> <entityField> <name>DROPDOWNDEFINITION</name> @@ -341,6 +341,7 @@ </entityProvider> <entityField> <name>AB_ATTRIBUTERELATIONID</name> + <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/ab_attributerelationid/valueProcess.js</valueProcess> </entityField> <entityProvider> <name>#PROVIDER_AGGREGATES</name> @@ -348,11 +349,6 @@ </entityProvider> <entityConsumer> <name>SpecificFilterAttributes</name> - <dependency> - <name>dependency</name> - <entityName>Attribute_entity</entityName> - <fieldName>SpecificFilterAttributes</fieldName> - </dependency> <children> <entityParameter> <name>AttributeCount_param</name> @@ -363,9 +359,20 @@ <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/specificfilterattributes/children/objecttype_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Attribute_entity</entityName> + <fieldName>SpecificFilterAttributes</fieldName> + </dependency> </entityConsumer> <entityProvider> <name>FilterProvider</name> + <children> + <entityParameter> + <name>DisplaySimpleName_param</name> + <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/filterprovider/children/displaysimplename_param/valueProcess.js</valueProcess> + </entityParameter> + </children> <dependencies> <entityDependency> <name>0560c6d0-8473-4050-9ca1-a935bbac2ef9</name> @@ -374,12 +381,6 @@ <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>DisplaySimpleName_param</name> - <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/filterprovider/children/displaysimplename_param/valueProcess.js</valueProcess> - </entityParameter> - </children> </entityProvider> </entityFields> <recordContainers> diff --git a/entity/AttributeUsage_entity/AttributeUsage_entity.aod b/entity/AttributeUsage_entity/AttributeUsage_entity.aod index 281daa5f5aafefe0a4307b836fefb819ed97670a..24f5a40c60896ee48346ad767a0ef4424930d7f1 100644 --- a/entity/AttributeUsage_entity/AttributeUsage_entity.aod +++ b/entity/AttributeUsage_entity/AttributeUsage_entity.aod @@ -78,10 +78,6 @@ <fieldName>Exclusive</fieldName> </dependency> <children> - <entityParameter> - <name>GetAllContexts_param</name> - <valueProcess>%aditoprj%/entity/AttributeUsage_entity/entityfields/context/children/getallcontexts_param/valueProcess.js</valueProcess> - </entityParameter> <entityParameter> <name>Blacklist_param</name> <valueProcess>%aditoprj%/entity/AttributeUsage_entity/entityfields/context/children/blacklist_param/valueProcess.js</valueProcess> diff --git a/entity/AttributeUsage_entity/entityfields/context/children/getallcontexts_param/valueProcess.js b/entity/AttributeUsage_entity/entityfields/context/children/getallcontexts_param/valueProcess.js deleted file mode 100644 index ed5935fc124e63ff268a7e65d5efceab70ac456e..0000000000000000000000000000000000000000 --- a/entity/AttributeUsage_entity/entityfields/context/children/getallcontexts_param/valueProcess.js +++ /dev/null @@ -1,2 +0,0 @@ -import("system.result"); -result.string(true); \ No newline at end of file diff --git a/entity/AttributeUsage_entity/recordcontainers/db/conditionProcess.js b/entity/AttributeUsage_entity/recordcontainers/db/conditionProcess.js index 4c333a888b165e2b3fff15433861e3de2b785344..854e2896ae3f2baa9ea18cbab4a7922e6821dd21 100644 --- a/entity/AttributeUsage_entity/recordcontainers/db/conditionProcess.js +++ b/entity/AttributeUsage_entity/recordcontainers/db/conditionProcess.js @@ -2,6 +2,5 @@ import("Sql_lib"); import("system.db"); import("system.result"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(newWhereIfSet("AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID", "$param.AttributeId_param") .toString()); diff --git a/entity/Attribute_entity/Attribute_entity.aod b/entity/Attribute_entity/Attribute_entity.aod index 26e2e934e598ad4d50c640da866a5cd4b452b3f2..76187e3927335461766933afcdea204d792bbfc6 100644 --- a/entity/Attribute_entity/Attribute_entity.aod +++ b/entity/Attribute_entity/Attribute_entity.aod @@ -61,11 +61,6 @@ <name>AttributeUsages</name> <refreshParent v="true" /> <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeusages/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>AttributeUsage_entity</entityName> - <fieldName>SpecificAttribute</fieldName> - </dependency> <children> <entityParameter> <name>AttributeId_param</name> @@ -81,6 +76,11 @@ <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributeusages/children/disablemincount_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>AttributeUsage_entity</entityName> + <fieldName>SpecificAttribute</fieldName> + </dependency> </entityConsumer> <entityField> <name>ATTRIBUTE_ACTIVE</name> @@ -92,11 +92,6 @@ </entityField> <entityConsumer> <name>KeywordAttributeTypes</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> @@ -108,6 +103,11 @@ <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/keywordattributetypes/children/whitelistids_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityField> <name>DROPDOWNDEFINITION</name> @@ -131,6 +131,34 @@ <entityProvider> <name>SpecificAttribute</name> <lookupIdfield>UID</lookupIdfield> + <documentation>%aditoprj%/entity/Attribute_entity/entityfields/specificattribute/documentation.adoc</documentation> + <children> + <entityParameter> + <name>ObjectType_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>FilteredAttributeIds_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>DisplaySimpleName_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/specificattribute/children/displaysimplename_param/valueProcess.js</valueProcess> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ChildId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ChildType_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ParentId_param</name> + <description>parent id, this is used for filtering by the parent in the content process</description> + </entityParameter> + </children> <dependencies> <entityDependency> <name>ba3b4d47-7385-49df-bf61-54c99f5b2c81</name> @@ -163,33 +191,6 @@ <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>ObjectType_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>FilteredAttributeIds_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>DisplaySimpleName_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/specificattribute/children/displaysimplename_param/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>ChildId_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>ChildType_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>ParentId_param</name> - <description>parent id, this is used for filtering by the parent in the content process</description> - </entityParameter> - </children> </entityProvider> <entityField> <name>FULL_ATTRIBUTE_NAME</name> @@ -214,6 +215,7 @@ </entityField> <entityProvider> <name>AttributeGroups</name> + <documentation>%aditoprj%/entity/Attribute_entity/entityfields/attributegroups/documentation.adoc</documentation> <children> <entityParameter> <name>ThemeObjectRowId_param</name> @@ -240,11 +242,6 @@ <entityConsumer> <name>AttributeGroup</name> <description>Used for the selection of the parent attribute</description> - <dependency> - <name>dependency</name> - <entityName>Attribute_entity</entityName> - <fieldName>AttributeGroups</fieldName> - </dependency> <children> <entityParameter> <name>ChildId_param</name> @@ -259,6 +256,11 @@ <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/displaysimplename_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Attribute_entity</entityName> + <fieldName>AttributeGroups</fieldName> + </dependency> </entityConsumer> <entityField> <name>ICON</name> @@ -309,25 +311,21 @@ </entityField> <entityConsumer> <name>Contexts</name> - <dependency> - <name>dependency</name> - <entityName>Context_entity</entityName> - <fieldName>Exclusive</fieldName> - </dependency> <children> <entityParameter> <name>Blacklist_param</name> <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/contexts/children/blacklist_param/valueProcess.js</valueProcess> </entityParameter> - <entityParameter> - <name>GetAllContexts_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/contexts/children/getallcontexts_param/valueProcess.js</valueProcess> - </entityParameter> <entityParameter> <name>InvertBlacklist_param</name> <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/contexts/children/invertblacklist_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Context_entity</entityName> + <fieldName>Exclusive</fieldName> + </dependency> </entityConsumer> <entityActionGroup> <name>AttributeActions</name> @@ -359,14 +357,6 @@ </entityActionField> <entityProvider> <name>ThemeProvider</name> - <dependencies> - <entityDependency> - <name>6e314038-62de-4f0c-b89a-92f029c10933</name> - <entityName>Activity_entity</entityName> - <fieldName>ActivityAtrributes</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>AttributeCount_param</name> @@ -385,6 +375,14 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>6e314038-62de-4f0c-b89a-92f029c10933</name> + <entityName>Activity_entity</entityName> + <fieldName>ActivityAtrributes</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityParameter> <name>ParentId_param</name> @@ -401,14 +399,6 @@ <sortingField>SORTING</sortingField> <documentation>%aditoprj%/entity/Attribute_entity/entityfields/attributechildren/documentation.adoc</documentation> <titlePlural>Child Attributes</titlePlural> - <dependencies> - <entityDependency> - <name>80023321-1954-483f-a4be-b7207557c068</name> - <entityName>Attribute_entity</entityName> - <fieldName>ChildAttributes</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>ChildId_param</name> @@ -448,16 +438,19 @@ <mandatory v="true" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>80023321-1954-483f-a4be-b7207557c068</name> + <entityName>Attribute_entity</entityName> + <fieldName>ChildAttributes</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityConsumer> <name>ChildAttributes</name> <refreshParent v="true" /> <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/childattributes/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>Attribute_entity</entityName> - <fieldName>AttributeChildren</fieldName> - </dependency> <children> <entityParameter> <name>DisplaySimpleName_param</name> @@ -472,6 +465,11 @@ <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/childattributes/children/parenttype_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Attribute_entity</entityName> + <fieldName>AttributeChildren</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>GetOnlyFirstLevelChildren_param</name> @@ -487,14 +485,6 @@ </entityProvider> <entityProvider> <name>SpecificFilterAttributes</name> - <dependencies> - <entityDependency> - <name>9b2b5f2e-229d-4a10-a54f-cbf77aafe512</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>SpecificFilterAttributes</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>DisplaySimpleName_param</name> @@ -505,6 +495,14 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>9b2b5f2e-229d-4a10-a54f-cbf77aafe512</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>SpecificFilterAttributes</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> </entityFields> <recordContainers> diff --git a/entity/Attribute_entity/entityfields/attributegroups/documentation.adoc b/entity/Attribute_entity/entityfields/attributegroups/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..6af9c11f0f7e8517aa60a8bdd6d5fb0a457dd6fc --- /dev/null +++ b/entity/Attribute_entity/entityfields/attributegroups/documentation.adoc @@ -0,0 +1,3 @@ += AttributeGroups + +This provider provides only attribute groups, it is used for the selection of an attribute parent. \ No newline at end of file diff --git a/entity/Attribute_entity/entityfields/contexts/children/getallcontexts_param/valueProcess.js b/entity/Attribute_entity/entityfields/contexts/children/getallcontexts_param/valueProcess.js deleted file mode 100644 index 40effa0178464da0c7850912345f19c7fa95975a..0000000000000000000000000000000000000000 --- a/entity/Attribute_entity/entityfields/contexts/children/getallcontexts_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/Attribute_entity/entityfields/specificattribute/documentation.adoc b/entity/Attribute_entity/entityfields/specificattribute/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..5084132f04b54babcf687262514ac3462c479261 --- /dev/null +++ b/entity/Attribute_entity/entityfields/specificattribute/documentation.adoc @@ -0,0 +1,4 @@ += SpecificAttribute + +This provider is used for selecting an attribute, for example to create an attribute relation in AttributeRelation_entity. +The attributes are usually filtered by the ObjectType_param parameter to show only attributes that can be used in a specific context. \ No newline at end of file diff --git a/entity/AuditLogHistory_entity/AuditLogHistory_entity.aod b/entity/AuditLogHistory_entity/AuditLogHistory_entity.aod index 88d93c5023fdb6b90668c9269a64a6a642785a08..2ed69d3a31331cf6801b12b2e12a38394e75d78b 100644 --- a/entity/AuditLogHistory_entity/AuditLogHistory_entity.aod +++ b/entity/AuditLogHistory_entity/AuditLogHistory_entity.aod @@ -2,12 +2,12 @@ <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> <name>AuditLogHistory_entity</name> <majorModelMode>DISTRIBUTED</majorModelMode> + <documentation>%aditoprj%/entity/AuditLogHistory_entity/documentation.adoc</documentation> <icon>VAADIN:LINES_LIST</icon> <title>Audit Log</title> <grantCreate v="false" /> <grantUpdate v="false" /> <grantDelete v="true" /> - <grantDeleteProcess>%aditoprj%/entity/AuditLogHistory_entity/grantDeleteProcess.js</grantDeleteProcess> <initFilterProcess>%aditoprj%/entity/AuditLogHistory_entity/initFilterProcess.js</initFilterProcess> <titlePlural>Audit Logs</titlePlural> <recordContainer>db</recordContainer> @@ -132,7 +132,7 @@ <filterExtensions> <filterExtension> <name>contextFilter</name> - <title>Kontext</title> + <title>Context</title> <contentType>TEXT</contentType> <filterValuesProcess>%aditoprj%/entity/AuditLogHistory_entity/recordcontainers/db/filterextensions/contextfilter/filterValuesProcess.js</filterValuesProcess> <filterConditionProcess>%aditoprj%/entity/AuditLogHistory_entity/recordcontainers/db/filterextensions/contextfilter/filterConditionProcess.js</filterConditionProcess> diff --git a/entity/AuditLogHistory_entity/documentation.adoc b/entity/AuditLogHistory_entity/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..2c0a2a12eb8182eeab3ad27c32727dee6d898c20 --- /dev/null +++ b/entity/AuditLogHistory_entity/documentation.adoc @@ -0,0 +1,3 @@ += AuditLogHistory_entity + +This is an entity for loading all log history entries from all contexts. \ No newline at end of file diff --git a/entity/BulkMailRecipient_entity/recordcontainers/db/conditionProcess.js b/entity/BulkMailRecipient_entity/recordcontainers/db/conditionProcess.js index a2473cad7ca8ee6904811861505e0e412ab6c6fa..01d4a5dc9c76ee5f350521eea0f4a2bb6016a3ec 100644 --- a/entity/BulkMailRecipient_entity/recordcontainers/db/conditionProcess.js +++ b/entity/BulkMailRecipient_entity/recordcontainers/db/conditionProcess.js @@ -2,5 +2,4 @@ import("system.db"); import("system.result"); import("Sql_lib"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(newWhere("BULKMAILRECIPIENT.BULKMAIL_ID", "$param.BulkMailId_param").toString()); \ No newline at end of file diff --git a/entity/CampaignAddParticipants_entity/CampaignAddParticipants_entity.aod b/entity/CampaignAddParticipants_entity/CampaignAddParticipants_entity.aod index 03225b22011f8eceea49d1282e545230251ab538..339e6914d5ffe2bea367524f8f684d43cb442d7a 100644 --- a/entity/CampaignAddParticipants_entity/CampaignAddParticipants_entity.aod +++ b/entity/CampaignAddParticipants_entity/CampaignAddParticipants_entity.aod @@ -6,6 +6,7 @@ <title>Add participants to Campaign</title> <siblings> <element>CampaignParticipant_entity</element> + <element>Campaign_entity</element> </siblings> <recordContainer>datalessConfig</recordContainer> <entityFields> @@ -59,6 +60,11 @@ </entityConsumer> <entityConsumer> <name>CampaignStepConsumer</name> + <dependency> + <name>dependency</name> + <entityName>CampaignStep_entity</entityName> + <fieldName>CampaignSteps</fieldName> + </dependency> <children> <entityParameter> <name>campaignId_param</name> @@ -66,12 +72,11 @@ <expose v="true" /> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>CampaignStep_entity</entityName> - <fieldName>CampaignSteps</fieldName> - </dependency> </entityConsumer> + <entityField> + <name>UID</name> + <state>EDITABLE</state> + </entityField> <entityParameter> <name>currentCampaignId_param</name> <expose v="true" /> @@ -152,6 +157,15 @@ </entityProvider> </entityFields> <recordContainers> + <jDitoRecordContainer> + <name>jdito</name> + <jDitoRecordAlias>Data_alias</jDitoRecordAlias> + <recordFieldMappings> + <jDitoRecordFieldMapping> + <name>UID.value</name> + </jDitoRecordFieldMapping> + </recordFieldMappings> + </jDitoRecordContainer> <datalessRecordContainer> <name>datalessConfig</name> <alias>Data_alias</alias> diff --git a/entity/CampaignAddParticipants_entity/entityfields/addparticipants/onActionProcess.js b/entity/CampaignAddParticipants_entity/entityfields/addparticipants/onActionProcess.js index b2c37dfa07d393af2fbd10b50ae3ea3dcac816b4..f1697b24ba89faca7eee7192a830ee3bf51ac713 100644 --- a/entity/CampaignAddParticipants_entity/entityfields/addparticipants/onActionProcess.js +++ b/entity/CampaignAddParticipants_entity/entityfields/addparticipants/onActionProcess.js @@ -31,7 +31,7 @@ else participantCondition = JSON.parse(vars.getString("$param.campaignParticipantsCondition_param")).condition; _handleCondition(campaignId, conditionSourceTableName, participantCondition); } - +neon.refreshAll(); if (!vars.exists("$param.currentCampaignId_param") || !vars.get("$param.currentCampaignId_param")) neon.openContext("Campaign", "CampaignMain_view", [campaignId], neon.OPERATINGSTATE_VIEW, null); diff --git a/entity/CampaignAnalysis_entity/CampaignAnalysis_entity.aod b/entity/CampaignAnalysis_entity/CampaignAnalysis_entity.aod index 137b70c4aa991ae7a2e366e78c7658701dd62d68..ff9e8a25ad8f036f8667aeb149349e1d8ed75766 100644 --- a/entity/CampaignAnalysis_entity/CampaignAnalysis_entity.aod +++ b/entity/CampaignAnalysis_entity/CampaignAnalysis_entity.aod @@ -6,6 +6,7 @@ <siblings> <element>CampaignCost_entity</element> </siblings> + <usePermissions v="false" /> <recordContainer>jdito</recordContainer> <entityFields> <entityProvider> diff --git a/entity/CampaignCostChart_entity/CampaignCostChart_entity.aod b/entity/CampaignCostChart_entity/CampaignCostChart_entity.aod index de366ec455d550396f8e3fbbbb404e73f7c8b02b..f5d7ee451e45fbcc532df7d5ee2d6e934ebe7d79 100644 --- a/entity/CampaignCostChart_entity/CampaignCostChart_entity.aod +++ b/entity/CampaignCostChart_entity/CampaignCostChart_entity.aod @@ -6,6 +6,7 @@ <siblings> <element>CampaignCost_entity</element> </siblings> + <usePermissions v="false" /> <recordContainer>jdito</recordContainer> <entityFields> <entityProvider> diff --git a/entity/CampaignCost_entity/CampaignCost_entity.aod b/entity/CampaignCost_entity/CampaignCost_entity.aod index 2af24acc0d0ade0e8fbe9d0df0397c5b4c1a2ced..096e8a8d95bd5caf65e5490d901dec5f44b583df 100644 --- a/entity/CampaignCost_entity/CampaignCost_entity.aod +++ b/entity/CampaignCost_entity/CampaignCost_entity.aod @@ -7,6 +7,7 @@ <element>CampaignAnalysis_entity</element> <element>CampaignCostChart_entity</element> </siblings> + <usePermissions v="false" /> <titlePlural>Cost entries</titlePlural> <recordContainer>db</recordContainer> <entityFields> @@ -236,6 +237,14 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityAggregateField> + <name>NET_aggregate</name> + <parentField>NET</parentField> + </entityAggregateField> + <entityAggregateField> + <name>NETPERPARTICIPANT_aggregate</name> + <parentField>netPerParticipant</parentField> + </entityAggregateField> </entityFields> <recordContainers> <dbRecordContainer> @@ -312,6 +321,15 @@ <name>CURRENCY.value</name> <recordfield>CAMPAIGN.CURRENCY</recordfield> </dbRecordFieldMapping> + <aggregateFieldDbMapping> + <name>NET_aggregate.value</name> + <recordfield>CAMPAIGNCOST.NET</recordfield> + <aggregateType>SUM</aggregateType> + </aggregateFieldDbMapping> + <aggregateFieldDbMapping> + <name>NETPERPARTICIPANT_aggregate.value</name> + <expression>%aditoprj%/entity/CampaignCost_entity/recordcontainers/db/recordfieldmappings/netperparticipant_aggregate.value/expression.js</expression> + </aggregateFieldDbMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/CampaignCost_entity/recordcontainers/db/conditionProcess.js b/entity/CampaignCost_entity/recordcontainers/db/conditionProcess.js index 0d440b3273654c53a9eb47fa0da830499214b1a0..41159ac869687465a8b95f1980f26bd891c9851d 100644 --- a/entity/CampaignCost_entity/recordcontainers/db/conditionProcess.js +++ b/entity/CampaignCost_entity/recordcontainers/db/conditionProcess.js @@ -19,5 +19,4 @@ else cond.and("CAMPAIGNCOST.CAMPAIGNSTEP_ID is null"); } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/CampaignCost_entity/recordcontainers/db/recordfieldmappings/netperparticipant_aggregate.value/expression.js b/entity/CampaignCost_entity/recordcontainers/db/recordfieldmappings/netperparticipant_aggregate.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..18b449265da4cb9e8479a5db4f859cfbc5d6bf53 --- /dev/null +++ b/entity/CampaignCost_entity/recordcontainers/db/recordfieldmappings/netperparticipant_aggregate.value/expression.js @@ -0,0 +1,3 @@ +import("system.result"); +result.string("SUM(CAMPAIGNCOST.NET/(select COUNT(*) from CAMPAIGNPARTICIPANT where CAMPAIGNCOST.CAMPAIGN_ID = CAMPAIGNPARTICIPANT.CAMPAIGN_ID " + +" and CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID = CAMPAIGNSTEP.CAMPAIGNSTEPID))"); \ No newline at end of file diff --git a/entity/CampaignParticipantChart_entity/CampaignParticipantChart_entity.aod b/entity/CampaignParticipantChart_entity/CampaignParticipantChart_entity.aod index 9f4d833b4dd531b6cd9df80f061ed1cd12be9704..6291fe367fc8692ca2d6e068e1d9a6e5a2531818 100644 --- a/entity/CampaignParticipantChart_entity/CampaignParticipantChart_entity.aod +++ b/entity/CampaignParticipantChart_entity/CampaignParticipantChart_entity.aod @@ -8,6 +8,7 @@ <element>CampaignStep_entity</element> <element>CampaignAddParticipants_entity</element> </siblings> + <usePermissions v="false" /> <recordContainer>jdito</recordContainer> <entityFields> <entityProvider> diff --git a/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod b/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod index 42f0af8d639be70deb1552aaab86af3c4dbf0953..c83cda0bd567d2bf66cf349b78e2ea0ba307de42 100644 --- a/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod +++ b/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod @@ -7,20 +7,21 @@ <siblings> <element>CampaignAddParticipants_entity</element> <element>CampaignParticipantChart_entity</element> + <element>Campaign_entity</element> </siblings> <afterOperatingState>%aditoprj%/entity/CampaignParticipant_entity/afterOperatingState.js</afterOperatingState> - <useFavorites v="true" /> + <usePermissions v="false" /> <titlePlural>Participants</titlePlural> - <recordContainer>ParticipantsDbRecordContainer</recordContainer> + <recordContainer>db</recordContainer> <entityFields> <entityProvider> <name>#PROVIDER</name> + <recordContainer>db</recordContainer> </entityProvider> <entityProvider> <name>CampaignParticipantsProvider</name> - <targetContextField>CONTACTCONTEXT</targetContextField> - <targetIdField>CONTACT_ID</targetIdField> <documentation>%aditoprj%/entity/CampaignParticipant_entity/entityfields/campaignparticipantsprovider/documentation.adoc</documentation> + <recordContainer>db</recordContainer> <children> <entityParameter> <name>ContactId_param</name> @@ -113,11 +114,9 @@ <name>CONTACT_ID</name> <title>Participant</title> <consumer>AnyContacts</consumer> - <linkedContextProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contact_id/linkedContextProcess.js</linkedContextProcess> <mandatory v="true" /> <state>READONLY</state> <stateProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contact_id/stateProcess.js</stateProcess> - <valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contact_id/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/contact_id/displayValueProcess.js</displayValueProcess> </entityField> <entityField> @@ -170,20 +169,12 @@ <title>Update campaign step</title> <onActionProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/onActionProcess.js</onActionProcess> <isObjectAction v="false" /> - <isSelectionAction v="false" /> + <isSelectionAction v="true" /> <iconId>NEON:GROUP_APPOINTMENT</iconId> - <state>DISABLED</state> - <stateProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/stateProcess.js</stateProcess> + <state>AUTO</state> <tooltip>Update campaign step</tooltip> <tooltipProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/tooltipProcess.js</tooltipProcess> </entityActionField> - <entityActionField> - <name>startMarketingWorkflows</name> - <title>Start marketing mailing</title> - <onActionProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js</onActionProcess> - <isObjectAction v="false" /> - <iconId>VAADIN:ENVELOPES</iconId> - </entityActionField> </children> </entityActionGroup> <entityField> @@ -237,29 +228,102 @@ <entityProvider> <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> + <recordContainer>db</recordContainer> </entityProvider> <entityField> - <name>HASADVERTISINGBAN</name> - <title>Advertising ban</title> - <contentType>BOOLEAN</contentType> - <dropDownProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/hasadvertisingban/dropDownProcess.js</dropDownProcess> + <name>CONTACT_ORGANISATION_ID</name> + <title>Organisation</title> + <linkedContext>Organisation</linkedContext> + </entityField> + <entityField> + <name>CONTACT_PERSON_ID</name> + <title>Participant</title> + <linkedContext>Person</linkedContext> + </entityField> + <entityField> + <name>PERSON_CONTACT_ID</name> + <title>Person</title> + <consumer>Persons</consumer> + <linkedContext>Person</linkedContext> </entityField> + <entityField> + <name>ORGANISATION_CONTACT_ID</name> + <title>Organisation</title> + <consumer>Organisations</consumer> + <groupable v="true" /> + <linkedContext>Organisation</linkedContext> + </entityField> + <entityConsumer> + <name>Persons</name> + <dependency> + <name>dependency</name> + <entityName>Person_entity</entityName> + <fieldName>Contacts</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>Organisations</name> + <dependency> + <name>dependency</name> + <entityName>Organisation_entity</entityName> + <fieldName>Organisations</fieldName> + </dependency> + </entityConsumer> + <entityField> + <name>RESPONSIBLE_CONTACT_ID</name> + <title>Responsible</title> + <consumer>ResponsibleEmployees</consumer> + <groupable v="true" /> + <linkedContext>Person</linkedContext> + <valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/responsible_contact_id/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/responsible_contact_id/displayValueProcess.js</displayValueProcess> + </entityField> + <entityConsumer> + <name>ResponsibleEmployees</name> + <dependency> + <name>dependency</name> + <entityName>Employee_entity</entityName> + <fieldName>Employees</fieldName> + </dependency> + </entityConsumer> </entityFields> <recordContainers> <dbRecordContainer> - <name>ParticipantsDbRecordContainer</name> + <name>db</name> <alias>Data_alias</alias> <hasDependentRecords v="true" /> - <conditionProcess>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/conditionProcess.js</conditionProcess> - <onDBInsert>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBInsert.js</onDBInsert> + <fromClauseProcess>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> + <conditionProcess>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <onDBInsert>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/onDBInsert.js</onDBInsert> <linkInformation> <linkInformation> - <name>12b5bf2e-e376-4c40-9799-fb07961a455d</name> + <name>02d0ac80-2767-401c-bdc1-aac3e8abf0e4</name> <tableName>CAMPAIGNPARTICIPANT</tableName> <primaryKey>CAMPAIGNPARTICIPANTID</primaryKey> <isUIDTable v="true" /> <readonly v="false" /> </linkInformation> + <linkInformation> + <name>6c320211-601b-47bf-a562-003886666040</name> + <tableName>CONTACT</tableName> + <primaryKey>CONTACTID</primaryKey> + <isUIDTable v="false" /> + <readonly v="true" /> + </linkInformation> + <linkInformation> + <name>e1719eb5-112c-4acd-8f72-58a688d5f058</name> + <tableName>PERSON</tableName> + <primaryKey>PERSONID</primaryKey> + <isUIDTable v="false" /> + <readonly v="true" /> + </linkInformation> + <linkInformation> + <name>8be80af4-69ea-4a5d-b404-8a26c1f8d8da</name> + <tableName>ORGANISATION</tableName> + <primaryKey>ORGANISATIONID</primaryKey> + <isUIDTable v="false" /> + <readonly v="true" /> + </linkInformation> </linkInformation> <recordFieldMappings> <dbRecordFieldMapping> @@ -300,25 +364,68 @@ <recordfield>CAMPAIGNPARTICIPANT.CAMPAIGNPARTICIPANTID</recordfield> </dbRecordFieldMapping> <dbRecordFieldMapping> - <name>STANDARD_EMAIL_COMMUNICATION.value</name> - <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_email_communication.value/expression.js</expression> - <isFilterable v="true" /> + <name>STANDARD_PHONE_COMMUNICATION.displayValue</name> + <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/standard_phone_communication.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>STANDARD_EMAIL_COMMUNICATION.displayValue</name> + <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/standard_email_communication.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ADVERTISINGBAN_ICON.value</name> + <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/advertisingban_icon.value/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CONTACT_PERSON_ID.displayValue</name> + <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/contact_person_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CAMPAIGNSTEP_ID.displayValue</name> + <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/campaignstep_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>campaignStepCurrentParticipantCount.value</name> + <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/campaignstepcurrentparticipantcount.value/expression.js</expression> </dbRecordFieldMapping> <dbRecordFieldMapping> - <name>STANDARD_PHONE_COMMUNICATION.value</name> - <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_phone_communication.value/expression.js</expression> + <name>ORGANISATION_CONTACT_ID.value</name> + <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/organisation_contact_id.value/expression.js</expression> + <isFilterable v="true" /> </dbRecordFieldMapping> - <consumerMapping> - <name>AnyContacts</name> - <filterConditionProcess>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/anycontacts/filterConditionProcess.js</filterConditionProcess> + <dbRecordFieldMapping> + <name>PERSON_CONTACT_ID.value</name> + <recordfield>CONTACT.CONTACTID</recordfield> <isFilterable v="true" /> - <filtertype>BASIC</filtertype> - </consumerMapping> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PERSON_CONTACT_ID.displayValue</name> + <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/person_contact_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> <dbRecordFieldMapping> - <name>HASADVERTISINGBAN.value</name> - <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/hasadvertisingban.value/expression.js</expression> + <name>RESPONSIBLE_CONTACT_ID.value</name> + <recordfield>CAMPAIGNPARTICIPANT.RESPONSIBLE_CONTACT_ID</recordfield> <isFilterable v="true" /> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>RESPONSIBLE_CONTACT_ID.displayValue</name> + <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/responsible_contact_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CONTACT_ORGANISATION_ID.displayValue</name> + <recordfield>ORGANISATION.NAME</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CONTACT_ORGANISATION_ID.value</name> + <recordfield>CONTACT.ORGANISATION_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CONTACT_PERSON_ID.value</name> + <recordfield>CONTACT.PERSON_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ORGANISATION_CONTACT_ID.displayValue</name> + <recordfield>ORGANISATION.NAME</recordfield> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/colorProcess.js b/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/colorProcess.js index f322e15de7ad601c5a31941c8e33b1fa34d33e83..1bcf3daac52e4e4473b002a163317af1c88db283 100644 --- a/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/colorProcess.js +++ b/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/colorProcess.js @@ -1,7 +1,16 @@ -import("Util_lib"); import("system.result"); +import("Sql_lib"); +import("system.db"); import("system.vars"); import("system.neon"); +import("Campaign_lib"); -var hasAdvertisingBan = Utils.toBoolean(vars.get("$field.HASADVERTISINGBAN")); -result.string(hasAdvertisingBan ? neon.PRIORITY_MEDIUM_COLOR : neon.PRIORITY_LOW_COLOR); \ No newline at end of file +if(vars.get("$field.ADVERTISINGBAN_ICON") > 0) +{ + result.string(neon.PRIORITY_MEDIUM_COLOR); +} +else +{ + result.string(neon.PRIORITY_LOW_COLOR); +} + diff --git a/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/displayValueProcess.js b/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/displayValueProcess.js index 7ff3faa94c8640ed84148138aef80e3973ba5b6d..837878d3b76182bb3c42d5b51b73c23349f95204 100644 --- a/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/displayValueProcess.js +++ b/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/displayValueProcess.js @@ -1,7 +1,12 @@ -import("Util_lib"); import("system.result"); import("system.vars"); // Now show warning always, if any commrestriction exists. No matter which medium the current step has. -var hasAdvertisingBan = Utils.toBoolean(vars.get("$field.HASADVERTISINGBAN")); -result.string(hasAdvertisingBan ? "VAADIN:WARNING" : "VAADIN:CHECK"); \ No newline at end of file +if (vars.get("$field.ADVERTISINGBAN_ICON") == 0) +{ + result.string("VAADIN:CHECK"); +} +else +{ + result.string("VAADIN:WARNING"); +} \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/campaignsteps/children/campaignid_param/valueProcess.js b/entity/CampaignParticipant_entity/entityfields/campaignsteps/children/campaignid_param/valueProcess.js index a22fac8bd5302593f1b008cf40574f6d662c3bb9..eb6914514d8b5113929b3fb4b41dd78767efde3a 100644 --- a/entity/CampaignParticipant_entity/entityfields/campaignsteps/children/campaignid_param/valueProcess.js +++ b/entity/CampaignParticipant_entity/entityfields/campaignsteps/children/campaignid_param/valueProcess.js @@ -1,8 +1,9 @@ import("system.vars"); import("system.result"); -import("system.neon"); -if (vars.get("$sys.viewmode") == neon.FRAME_VIEWMODE_TABLE) - result.string(vars.get("$param.CampaignId_param")); -else - result.string(vars.get("$field.CAMPAIGN_ID")); \ No newline at end of file +var campaignID = vars.get("$field.CAMPAIGN_ID"); + +if(!campaignID) + campaignID = vars.get("$param.CampaignId_param"); + +result.string(campaignID); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/contact_id/displayValueProcess.js b/entity/CampaignParticipant_entity/entityfields/contact_id/displayValueProcess.js index 1e3714bbbc7b3249e43757d6d933fb289cb4f767..85822946ab4fe0ba7730ca93fd6fca69250a5b33 100644 --- a/entity/CampaignParticipant_entity/entityfields/contact_id/displayValueProcess.js +++ b/entity/CampaignParticipant_entity/entityfields/contact_id/displayValueProcess.js @@ -3,10 +3,4 @@ import("system.vars"); import("Contact_lib"); import("system.neon"); -let contactId = vars.getString("$field.CONTACT_ID"); -let displayValue = ""; - -if(contactId != "") - displayValue = ContactUtils.getFullTitleByContactId(contactId); - -result.string(displayValue); +result.string(ContactUtils.getFullTitleByContactId(vars.getString("$field.CONTACT_ID"))); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/contact_id/linkedContextProcess.js b/entity/CampaignParticipant_entity/entityfields/contact_id/linkedContextProcess.js deleted file mode 100644 index 2e504d63e3b5a3f71b54b072798b3ad09c50984b..0000000000000000000000000000000000000000 --- a/entity/CampaignParticipant_entity/entityfields/contact_id/linkedContextProcess.js +++ /dev/null @@ -1,5 +0,0 @@ -import("system.vars"); -import("system.result"); -import("Contact_lib"); - -result.string(ContactUtils.getContextByContactId(vars.getString("$field.CONTACT_ID"))); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/contact_id/valueProcess.js b/entity/CampaignParticipant_entity/entityfields/contact_id/valueProcess.js deleted file mode 100644 index 7a0567f685002323c521639e56667e945aa30d91..0000000000000000000000000000000000000000 --- a/entity/CampaignParticipant_entity/entityfields/contact_id/valueProcess.js +++ /dev/null @@ -1,5 +0,0 @@ -import("system.result"); -import("system.vars"); - -if(vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param")) - result.string(vars.get("$param.ContactId_param")); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/onActionProcess.js b/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/onActionProcess.js index 5f2f7a2cfa299eb520877db19056edad8bbef2f6..fbba2db18aa37636d3d3ca5097cccd1c29df51e7 100644 --- a/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/onActionProcess.js +++ b/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/onActionProcess.js @@ -13,6 +13,5 @@ if(sysSelection.length > 0) //selektierte IDs als Array } else { - let sysFilter = vars.get("$sys.filter");//todo change name - CampaignUtils.openSetCampaignStepViewByCondition(JSON.stringify(sysFilter), campaignId, campaignStepId); + CampaignUtils.openSetCampaignStepViewByCondition(JSON.stringify(vars.get("$sys.filter")), campaignId, campaignStepId); } \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/stateProcess.js b/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/stateProcess.js deleted file mode 100644 index d55386c662b50138c9a582d15dfcd103d2200e20..0000000000000000000000000000000000000000 --- a/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/stateProcess.js +++ /dev/null @@ -1,16 +0,0 @@ -import("Campaign_lib"); -import("system.vars"); -import("system.neon"); -import("system.result"); - -var campaignId = vars.get("$field.CAMPAIGN_ID"); -var participantCount = CampaignUtils.getParticipantCount(campaignId); - -if(participantCount > 0) -{ - result.string(neon.COMPONENTSTATE_EDITABLE); -} -else -{ - result.string(neon.COMPONENTSTATE_DISABLED); -} \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js b/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js deleted file mode 100644 index 40e60ff20d2ca20af3b447981c2a988959d2de63..0000000000000000000000000000000000000000 --- a/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js +++ /dev/null @@ -1,36 +0,0 @@ -import("Util_lib"); -import("system.entities"); -import("Context_lib"); -import("system.vars"); -import("system.neon"); - -var rows = vars.get("$sys.selectionRows"); -var filter = vars.get("$sys.filter").filter; -var targets = []; - -if (Utils.isNullOrEmpty(rows)) -{ - let loadConfig = entities.createConfigForLoadingRows() - .entity("CampaignParticipant_entity") - .provider("CampaignParticipantsProvider") - .fields(["CONTACT_ID", "CONTACTCONTEXT"]) - .addParameter("CampaignId_param", vars.get("$param.CampaignId_param")) - .addParameter("CampaignStepId_param", vars.get("$param.CampaignStepId_param")) - .addParameter("ContactId_param", vars.get("$param.ContactId_param")); - - if (filter) - loadConfig.filter(JSON.stringify(filter)); - - rows = entities.getRows(loadConfig); -} - -rows = rows.map(function (row) -{ - return [row["CONTACT_ID"], row["CONTACTCONTEXT"]]; -}); - - -neon.openContext("MarketingWorkflowLauncher", "MarketingWorkflowLauncherEdit_view", null, neon.OPERATINGSTATE_VIEW, { - "ObjectIds_param": JSON.stringify(rows), - "ObjectType_param": ContextUtils.getCurrentContextId() -}); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/hasadvertisingban/dropDownProcess.js b/entity/CampaignParticipant_entity/entityfields/hasadvertisingban/dropDownProcess.js deleted file mode 100644 index 3373b8a886df7267c9205c206442cb2e091128fb..0000000000000000000000000000000000000000 --- a/entity/CampaignParticipant_entity/entityfields/hasadvertisingban/dropDownProcess.js +++ /dev/null @@ -1,7 +0,0 @@ -import("system.translate"); -import("system.result"); - -result.object([ - ["1", translate.text("Yes")], - ["0", translate.text("No")] -]); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/responsible_contact_id/displayValueProcess.js b/entity/CampaignParticipant_entity/entityfields/responsible_contact_id/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..92bb44a696f0c6d44599487fd487f086d632b652 --- /dev/null +++ b/entity/CampaignParticipant_entity/entityfields/responsible_contact_id/displayValueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); +import("Contact_lib"); + +result.string(ContactUtils.getTitleByContactId(vars.get("$field.RESPONSIBLE_CONTACT_ID"))); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/responsible_contact_id/valueProcess.js b/entity/CampaignParticipant_entity/entityfields/responsible_contact_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a952fcd46b87af6cd15e61a321c986df950fe4d7 --- /dev/null +++ b/entity/CampaignParticipant_entity/entityfields/responsible_contact_id/valueProcess.js @@ -0,0 +1,6 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) + result.string(vars.get("$global.user.contactId")); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/conditionProcess.js b/entity/CampaignParticipant_entity/recordcontainers/db/conditionProcess.js similarity index 100% rename from entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/conditionProcess.js rename to entity/CampaignParticipant_entity/recordcontainers/db/conditionProcess.js diff --git a/entity/CampaignParticipant_entity/recordcontainers/db/fromClauseProcess.js b/entity/CampaignParticipant_entity/recordcontainers/db/fromClauseProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8603fcea0476d3281eedbdcb42db6032e193ff12 --- /dev/null +++ b/entity/CampaignParticipant_entity/recordcontainers/db/fromClauseProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +result.string("CAMPAIGNPARTICIPANT " + +" join CONTACT on CONTACTID = CONTACT_ID " + +" left join PERSON ON PERSONID = PERSON_ID " + +" join ORGANISATION on ORGANISATION_ID = ORGANISATIONiD"); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBInsert.js b/entity/CampaignParticipant_entity/recordcontainers/db/onDBInsert.js similarity index 100% rename from entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBInsert.js rename to entity/CampaignParticipant_entity/recordcontainers/db/onDBInsert.js diff --git a/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/advertisingban_icon.value/expression.js b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/advertisingban_icon.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..3343ac44d8f919400aa9972b5f1c0cd3f7837c57 --- /dev/null +++ b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/advertisingban_icon.value/expression.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("Contact_lib"); +import("Sql_lib"); +import("system.result"); + +// Now show warning always, if any commrestriction exists. No matter which medium the current step has. +result.string("(" + ContactUtils.getCommRestrictionCount(undefined, vars.get("$sys.date")) + ")"); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/contact_person_id.displayvalue/expression.js b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/contact_person_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..d28cdbab4f0d456577a81ffdacfca0609beb60d4 --- /dev/null +++ b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/contact_person_id.displayvalue/expression.js @@ -0,0 +1,3 @@ +import("system.result"); +import("Person_lib"); +result.string(PersUtils.getResolvingDisplaySubSql("CONTACT_ID")); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/organisation_contact_id.value/expression.js b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/organisation_contact_id.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..93edad8b41dce7f2dbaab8c776c8054e9097c7a2 --- /dev/null +++ b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/organisation_contact_id.value/expression.js @@ -0,0 +1,14 @@ +import("system.SQLTYPES"); +import("Sql_lib"); +import("system.result"); + +result.string(SqlBuilder.caseWhen(newWhere(newSelect("COUNT(*)") + .from("CONTACT") + .where("CONTACT.CONTACTID = CAMPAIGNPARTICIPANT.CONTACT_ID") + .and("CONTACT.PERSON_ID is null"), "0", SqlBuilder.GREATER(), SQLTYPES.INTEGER)) + .then("CAMPAIGNPARTICIPANT.CONTACT_ID") + .elseValue(newSelect("c1.CONTACTID") + .from("CONTACT", "c1") + .join("CONTACT", "c1.ORGANISATION_ID = c2.ORGANISATION_ID", "c2") + .where("c2.CONTACTID = CAMPAIGNPARTICIPANT.CONTACT_ID") + .and("c1.PERSON_ID is null")).toString()) \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/person_contact_id.displayvalue/expression.js b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/person_contact_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..8e485513f892edef1812070b5521317ed059cf3d --- /dev/null +++ b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/person_contact_id.displayvalue/expression.js @@ -0,0 +1,3 @@ +import("system.result"); +import("Person_lib"); +result.string(PersUtils.getResolvingDisplaySubSql("CAMPAIGNPARTICIPANT.CONTACT_ID")); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/responsible_contact_id.displayvalue/expression.js b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/responsible_contact_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..29d2f306f74cbad80faada5dba266f0c819e76d3 --- /dev/null +++ b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/responsible_contact_id.displayvalue/expression.js @@ -0,0 +1,3 @@ +import("system.result"); +import("Person_lib"); +result.string(PersUtils.getResolvingDisplaySubSql("CAMPAIGNPARTICIPANT.RESPONSIBLE_CONTACT_ID")); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_email_communication.value/expression.js b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/standard_email_communication.displayvalue/expression.js similarity index 100% rename from entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_email_communication.value/expression.js rename to entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/standard_email_communication.displayvalue/expression.js diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_phone_communication.value/expression.js b/entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/standard_phone_communication.displayvalue/expression.js similarity index 100% rename from entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_phone_communication.value/expression.js rename to entity/CampaignParticipant_entity/recordcontainers/db/recordfieldmappings/standard_phone_communication.displayvalue/expression.js diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/anycontacts/filterConditionProcess.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/anycontacts/filterConditionProcess.js deleted file mode 100644 index c37a5f4a9b9f278e371d4609622c78b70aafe351..0000000000000000000000000000000000000000 --- a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/anycontacts/filterConditionProcess.js +++ /dev/null @@ -1,10 +0,0 @@ -import("system.result"); -import("system.vars"); -import("Contact_lib"); -import("Sql_lib"); - -var condition = newWhere(null, ContactUtils.getFullContactSqlBuilder("CONTACTID") - .where("CONTACTID = CAMPAIGNPARTICIPANT.CONTACT_ID") - .and(vars.get("$local.condition")), SqlBuilder.EXISTS()); - -result.string(condition.toString()); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/campaignstep_id.displayvalue/expression.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/campaignstep_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..c2a7f5503d93c7ac48568fb0476a41b0bb4193ef --- /dev/null +++ b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/campaignstep_id.displayvalue/expression.js @@ -0,0 +1,3 @@ +import("system.result"); +import("Sql_lib"); +result.string(newSelect("CAMPAIGNSTEP.NAME").from("CAMPAIGNSTEP").where("CAMPAIGNSTEP.CAMPAIGNSTEPID = CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID").toString()); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/campaignstepcurrentparticipantcount.value/expression.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/campaignstepcurrentparticipantcount.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..7d896cba463f89dde65274356f8bbc5fb2a1097e --- /dev/null +++ b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/campaignstepcurrentparticipantcount.value/expression.js @@ -0,0 +1,3 @@ +import("system.result"); +import("Sql_lib"); +result.string(newSelect("COUNT(*)").from("CAMPAIGNPARTICIPANT", "p1").where("p1.CAMPAIGNSTEP_ID = CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID").toString()); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/hasadvertisingban.value/expression.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/hasadvertisingban.value/expression.js deleted file mode 100644 index b1292f5439920657e37cfaa83ca71afd2ce1a5a8..0000000000000000000000000000000000000000 --- a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/hasadvertisingban.value/expression.js +++ /dev/null @@ -1,11 +0,0 @@ -import("system.vars"); -import("Contact_lib"); -import("Sql_lib"); -import("system.result"); - -var commRestrictionContactSubSql = newSelect("CONTACT.CONTACTID") - .from("CONTACT") - .where("CONTACT.CONTACTID = CAMPAIGNPARTICIPANT.CONTACT_ID") - .and(ContactUtils.getCommRestrictionCondition()); - -result.string(SqlBuilder.caseWhen(null, commRestrictionContactSubSql, SqlBuilder.EXISTS()).thenString("1").elseString("0").toString()); \ No newline at end of file diff --git a/entity/CampaignPlanning_entity/CampaignPlanning_entity.aod b/entity/CampaignPlanning_entity/CampaignPlanning_entity.aod index 2de87bf6e8cb49f4aa8850d0674b0e85d81a2767..f274ff6890107a465ec82b673a40316a9b542e39 100644 --- a/entity/CampaignPlanning_entity/CampaignPlanning_entity.aod +++ b/entity/CampaignPlanning_entity/CampaignPlanning_entity.aod @@ -9,6 +9,7 @@ <element>CampaignStep_entity</element> </siblings> <iconId>NEON:GROUP_APPOINTMENT</iconId> + <usePermissions v="false" /> <recordContainer>jditoRecordContainer</recordContainer> <entityFields> <entityProvider> diff --git a/entity/CampaignStep_entity/CampaignStep_entity.aod b/entity/CampaignStep_entity/CampaignStep_entity.aod index 38abc14be1b8c632764cc2e8ad4081a5b798d5f3..ae04d014704d51efa439bccfadc959d52dd1ec70 100644 --- a/entity/CampaignStep_entity/CampaignStep_entity.aod +++ b/entity/CampaignStep_entity/CampaignStep_entity.aod @@ -11,8 +11,10 @@ </siblings> <grantDeleteProcess>%aditoprj%/entity/CampaignStep_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/CampaignStep_entity/contentTitleProcess.js</contentTitleProcess> + <contentDescriptionProcess>%aditoprj%/entity/CampaignStep_entity/contentDescriptionProcess.js</contentDescriptionProcess> <onValidation>%aditoprj%/entity/CampaignStep_entity/onValidation.js</onValidation> <imageProcess>%aditoprj%/entity/CampaignStep_entity/imageProcess.js</imageProcess> + <usePermissions v="false" /> <titlePlural>Steps</titlePlural> <recordContainer>db</recordContainer> <entityFields> @@ -58,6 +60,7 @@ <title>Responsible</title> <consumer>Employees</consumer> <groupable v="true" /> + <linkedContext>Person</linkedContext> <mandatory v="true" /> <valueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/employee_contact_id/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/employee_contact_id/displayValueProcess.js</displayValueProcess> @@ -95,7 +98,6 @@ <groupable v="true" /> <mandatory v="true" /> <valueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/status/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/status/displayValueProcess.js</displayValueProcess> </entityField> <entityField> <name>SORTING</name> @@ -244,6 +246,12 @@ <entityName>Employee_entity</entityName> <fieldName>Employees</fieldName> </dependency> + <children> + <entityParameter> + <name>OnlyActives_param</name> + <valueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/employees/children/onlyactives_param/valueProcess.js</valueProcess> + </entityParameter> + </children> </entityConsumer> <entityConsumer> <name>CampaignStepCosts</name> @@ -375,27 +383,11 @@ <expose v="true" /> <description>PARAMETER</description> </entityParameter> - <entityConsumer> - <name>CampaignStepMedium</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContainerName_param</name> - <valueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/campaignstepmedium/children/containername_param/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - </children> - </entityConsumer> <entityField> <name>STEPMEDIUM</name> <title>Medium</title> - <consumer>CampaignStepMedium</consumer> + <consumer>KeywordStepMedium</consumer> <groupable v="true" /> - <displayValueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/stepmedium/displayValueProcess.js</displayValueProcess> </entityField> <entityActionField> <name>newBulkMail</name> @@ -422,6 +414,23 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityField> + <name>CurrentParticipantsPerStep</name> + </entityField> + <entityConsumer> + <name>KeywordStepMedium</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/keywordstepmedium/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <dbRecordContainer> @@ -520,6 +529,18 @@ <name>STEPMEDIUM.value</name> <recordfield>CAMPAIGNSTEP.STEPMEDIUM</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CurrentParticipantsPerStep.value</name> + <expression>%aditoprj%/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/currentparticipantsperstep.value/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>STEPMEDIUM.displayValue</name> + <expression>%aditoprj%/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/stepmedium.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>EMPLOYEE_CONTACT_ID.displayValue</name> + <expression>%aditoprj%/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/CampaignStep_entity/contentDescriptionProcess.js b/entity/CampaignStep_entity/contentDescriptionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b07a72fe7cc543e3bedc5d5604f12f28769ffb6b --- /dev/null +++ b/entity/CampaignStep_entity/contentDescriptionProcess.js @@ -0,0 +1,5 @@ +import("system.translate"); +import("system.datetime"); +import("system.vars"); +import("system.result"); +result.string(datetime.toDate(vars.get("$field.DATE_NEW"), translate.text("dd.MM.yyyy"))); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/currentmaxparticipantsinfo/valueProcess.js b/entity/CampaignStep_entity/entityfields/currentmaxparticipantsinfo/valueProcess.js index 86c117c70ddf7fe6b5a8c94a811313929cec7a00..e9ba9c24747c9a500d2b4a46091b85a8a1167b4b 100644 --- a/entity/CampaignStep_entity/entityfields/currentmaxparticipantsinfo/valueProcess.js +++ b/entity/CampaignStep_entity/entityfields/currentmaxparticipantsinfo/valueProcess.js @@ -2,6 +2,14 @@ import("system.result"); import("system.vars"); import("Campaign_lib"); -let currentParticipantsCount = CampaignUtils.getParticipantCountForStep(vars.get("$field.CAMPAIGNSTEPID"), vars.get("$field.CAMPAIGN_ID")); -let maxParticipantsStepCount = vars.get("$field.MAXPARTICIPANTS"); -result.string(currentParticipantsCount + "/" + maxParticipantsStepCount); \ No newline at end of file +var currentParticipantsCount = vars.get("$field.CurrentParticipantsPerStep"); +var maxParticipantsStepCount = vars.get("$field.MAXPARTICIPANTS"); +var res = []; + +if(currentParticipantsCount) + res.push(currentParticipantsCount); + +if(maxParticipantsStepCount) + res.push(maxParticipantsStepCount); + +result.string(res.join("/")); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/employee_contact_id/displayValueProcess.js b/entity/CampaignStep_entity/entityfields/employee_contact_id/displayValueProcess.js index 351d4b3f2c2dd75cb77ecc6ae3e0ec36f0b467de..037d5e264baf41f4e2b0ebcfce8103d365ee7e13 100644 --- a/entity/CampaignStep_entity/entityfields/employee_contact_id/displayValueProcess.js +++ b/entity/CampaignStep_entity/entityfields/employee_contact_id/displayValueProcess.js @@ -1,5 +1,5 @@ -import("system.vars"); -import("system.result"); -import("Contact_lib"); - +import("system.vars"); +import("system.result"); +import("Contact_lib"); + result.string(ContactUtils.getTitleByContactId(vars.get("$field.EMPLOYEE_CONTACT_ID"))); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/employee_contact_id/valueProcess.js b/entity/CampaignStep_entity/entityfields/employee_contact_id/valueProcess.js index 0e00e387dfc0f28d5aa51163bd183e450f8535b9..85f342bc9d6e0a7d82ad065c59d5d30e6c735fe6 100644 --- a/entity/CampaignStep_entity/entityfields/employee_contact_id/valueProcess.js +++ b/entity/CampaignStep_entity/entityfields/employee_contact_id/valueProcess.js @@ -3,5 +3,5 @@ import("system.neon"); import("system.vars"); import("Employee_lib"); -if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) - result.string(EmployeeUtils.getCurrentContactId()); \ No newline at end of file +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) + result.string(EmployeeUtils.getCurrentContactId()); diff --git a/entity/DocumentTemplatePlaceOfUse_entity/entityfields/contextdocumenttemplateplaceofuse/children/getallcontexts_param/valueProcess.js b/entity/CampaignStep_entity/entityfields/employees/children/onlyactives_param/valueProcess.js similarity index 97% rename from entity/DocumentTemplatePlaceOfUse_entity/entityfields/contextdocumenttemplateplaceofuse/children/getallcontexts_param/valueProcess.js rename to entity/CampaignStep_entity/entityfields/employees/children/onlyactives_param/valueProcess.js index 40effa0178464da0c7850912345f19c7fa95975a..cda204045d2aba9ae974e0ce2200ba0cc6c852c0 100644 --- a/entity/DocumentTemplatePlaceOfUse_entity/entityfields/contextdocumenttemplateplaceofuse/children/getallcontexts_param/valueProcess.js +++ b/entity/CampaignStep_entity/entityfields/employees/children/onlyactives_param/valueProcess.js @@ -1,3 +1,2 @@ import("system.result"); - result.string(true); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/keywordstates/children/containername_param/valueProcess.js b/entity/CampaignStep_entity/entityfields/keywordstates/children/containername_param/valueProcess.js index 3567518a6daebc37b34b1d557a04f5410c2d0a34..09fcdcf23e88706a34b513b13000ad5db2059234 100644 --- a/entity/CampaignStep_entity/entityfields/keywordstates/children/containername_param/valueProcess.js +++ b/entity/CampaignStep_entity/entityfields/keywordstates/children/containername_param/valueProcess.js @@ -1,5 +1,4 @@ import("system.result"); -import("Keyword_lib"); import("KeywordRegistry_basic"); result.string($KeywordRegistry.campaignStepState()); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/campaignstepmedium/children/containername_param/valueProcess.js b/entity/CampaignStep_entity/entityfields/keywordstepmedium/children/containername_param/valueProcess.js similarity index 81% rename from entity/CampaignStep_entity/entityfields/campaignstepmedium/children/containername_param/valueProcess.js rename to entity/CampaignStep_entity/entityfields/keywordstepmedium/children/containername_param/valueProcess.js index a944db3259568d4c9b4453d682666704918a9b80..87e20a83401fc3a61ebc4f743ca2cc9763788253 100644 --- a/entity/CampaignStep_entity/entityfields/campaignstepmedium/children/containername_param/valueProcess.js +++ b/entity/CampaignStep_entity/entityfields/keywordstepmedium/children/containername_param/valueProcess.js @@ -1,5 +1,3 @@ -import("system.result"); -import("Keyword_lib"); -import("KeywordRegistry_basic"); - +import("KeywordRegistry_basic"); +import("system.result"); result.string($KeywordRegistry.communicationMediumCampaign()); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/maxparticipants/onValidation.js b/entity/CampaignStep_entity/entityfields/maxparticipants/onValidation.js index fd6b6aef2f69c7be604ebcf0512609e3dfdff3cb..de688c4d15daf210c375a6bb8bc8f6af326f20fd 100644 --- a/entity/CampaignStep_entity/entityfields/maxparticipants/onValidation.js +++ b/entity/CampaignStep_entity/entityfields/maxparticipants/onValidation.js @@ -1,3 +1,4 @@ +import("system.translate"); import("Campaign_lib"); import("system.result"); import("Entity_lib"); @@ -7,4 +8,6 @@ var currentParticipantsCount = parseInt(vars.get("$field.CurrentMaxParticipantsI var newMaxParticipantsCount = parseInt(vars.get("local.value")); if(newMaxParticipantsCount < currentParticipantsCount) - result.string(CampaignUtils.getMaxParticipantsValidationMessage()); \ No newline at end of file + result.string(CampaignUtils.getMaxParticipantsValidationMessage()); +else if(newMaxParticipantsCount <= 0) + result.string(translate.text("The max participants count can not be equal or less then 0")); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/status/displayValueProcess.js b/entity/CampaignStep_entity/entityfields/status/displayValueProcess.js deleted file mode 100644 index d0247bf23ab99895d336f6954448a7866fc855c5..0000000000000000000000000000000000000000 --- a/entity/CampaignStep_entity/entityfields/status/displayValueProcess.js +++ /dev/null @@ -1,6 +0,0 @@ -import("system.result"); -import("system.vars"); -import("Keyword_lib"); -import("KeywordRegistry_basic"); - -result.string(KeywordUtils.getViewValue($KeywordRegistry.campaignStepState(), vars.get("$field.STATUS"))); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/status/valueProcess.js b/entity/CampaignStep_entity/entityfields/status/valueProcess.js index dc5efe1d6fe6cca00ad15ff17d26d7fe16a98a55..ed6f79285d36d3d6d904c6554b6e28b79b09d861 100644 --- a/entity/CampaignStep_entity/entityfields/status/valueProcess.js +++ b/entity/CampaignStep_entity/entityfields/status/valueProcess.js @@ -1,7 +1,7 @@ +import("KeywordRegistry_basic"); import("system.vars"); import("system.result"); import("system.neon"); -import("KeywordRegistry_basic"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) - result.string($KeywordRegistry.campaignStepState$open()); \ No newline at end of file + result.string($KeywordRegistry.campaignStepState$open); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/stepmedium/displayValueProcess.js b/entity/CampaignStep_entity/entityfields/stepmedium/displayValueProcess.js deleted file mode 100644 index 429287a14cde6238f380ff76c6b30c2e6ca93f05..0000000000000000000000000000000000000000 --- a/entity/CampaignStep_entity/entityfields/stepmedium/displayValueProcess.js +++ /dev/null @@ -1,6 +0,0 @@ -import("system.result"); -import("system.vars"); -import("KeywordRegistry_basic"); -import("Keyword_lib"); - -result.string(KeywordUtils.getViewValue($KeywordRegistry.communicationMediumCampaign(), vars.get("$field.STEPMEDIUM"))); diff --git a/entity/CampaignStep_entity/recordcontainers/db/conditionProcess.js b/entity/CampaignStep_entity/recordcontainers/db/conditionProcess.js index d3d9bfc8c7b5828c91439ec247e9af5ec5ac33a4..c28e929a43d58b57ee5279fea896c3634511bf31 100644 --- a/entity/CampaignStep_entity/recordcontainers/db/conditionProcess.js +++ b/entity/CampaignStep_entity/recordcontainers/db/conditionProcess.js @@ -6,5 +6,4 @@ import("system.result"); var cond = newWhereIfSet("CAMPAIGNSTEP.CAMPAIGN_ID", "$param.campaignId_param") .andIfSet("CAMPAIGNSTEP.SORTING","$param.maxSort_param", SqlBuilder.LESS_OR_EQUAL()); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/currentparticipantsperstep.value/expression.js b/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/currentparticipantsperstep.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..adbfaa81f0fab15ab159113880fd2c1cdd6ce47d --- /dev/null +++ b/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/currentparticipantsperstep.value/expression.js @@ -0,0 +1,3 @@ +import("system.result"); +import("Sql_lib"); +result.string(newSelect("COUNT(*)").from("CAMPAIGNPARTICIPANT").where("CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID = CAMPAIGNSTEP.CAMPAIGNSTEPID").toString()); \ No newline at end of file diff --git a/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js b/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..54ff36ce1d19a4fcaf358c6242271a93d788c915 --- /dev/null +++ b/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js @@ -0,0 +1,3 @@ +import("system.result"); +import("Person_lib"); +result.string(PersUtils.getResolvingDisplaySubSql("CAMPAIGNSTEP.EMPLOYEE_CONTACT_ID")); \ No newline at end of file diff --git a/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js b/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js index f0e8a44adee3749dafae8e5cba1b67c52701e01a..dd2e2affd49e8a4b142168764ba20c101f1f500e 100644 --- a/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js +++ b/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js @@ -1,6 +1,5 @@ import("system.result"); import("Keyword_lib"); -import("KeywordRegistry_basic"); -var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.campaignStepState(), "CAMPAIGNSTEP.STATUS"); +var sql = KeywordUtils.getResolvedTitleSqlPart("CampaignManagementStepStates", "CAMPAIGNSTEP.STATUS"); result.string(sql); \ No newline at end of file diff --git a/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/stepmedium.displayvalue/expression.js b/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/stepmedium.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..260b5474d57381f02195ced3290c820a2eea719f --- /dev/null +++ b/entity/CampaignStep_entity/recordcontainers/db/recordfieldmappings/stepmedium.displayvalue/expression.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Keyword_lib"); + +var sql = KeywordUtils.getResolvedTitleSqlPart("CommunicationMediumCampaign", "CAMPAIGNSTEP.STEPMEDIUM"); +result.string(sql); \ No newline at end of file diff --git a/entity/Campaign_entity/Campaign_entity.aod b/entity/Campaign_entity/Campaign_entity.aod index 37416e7b55c7aa8aeec8dc400816f6df5b390cae..c2114b2939defe7d09aeb6093a03861d133408fd 100644 --- a/entity/Campaign_entity/Campaign_entity.aod +++ b/entity/Campaign_entity/Campaign_entity.aod @@ -10,9 +10,12 @@ <element>CampaignCost_entity</element> <element>CampaignCostChart_entity</element> <element>CampaignStep_entity</element> + <element>CampaignAddParticipants_entity</element> + <element>CampaignParticipant_entity</element> </siblings> <grantDeleteProcess>%aditoprj%/entity/Campaign_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/Campaign_entity/contentTitleProcess.js</contentTitleProcess> + <contentDescriptionProcess>%aditoprj%/entity/Campaign_entity/contentDescriptionProcess.js</contentDescriptionProcess> <afterUiInit>%aditoprj%/entity/Campaign_entity/afterUiInit.js</afterUiInit> <useFavorites v="true" /> <iconId>VAADIN:GROUP</iconId> @@ -45,7 +48,6 @@ <name>NAME</name> <title>Name</title> <mandatory v="true" /> - <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/name/valueProcess.js</valueProcess> </entityField> <entityField> <name>DATE_START</name> @@ -71,6 +73,7 @@ <title>Person in charge</title> <consumer>Employee</consumer> <groupable v="true" /> + <linkedContext>Person</linkedContext> <mandatory v="true" /> <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/employee_contact_id/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/Campaign_entity/entityfields/employee_contact_id/displayValueProcess.js</displayValueProcess> @@ -79,7 +82,6 @@ <name>DESCRIPTION</name> <title>Description</title> <contentType>LONG_TEXT</contentType> - <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/description/valueProcess.js</valueProcess> </entityField> <entityField> <name>USER_NEW</name> @@ -127,7 +129,6 @@ <groupable v="true" /> <mandatory v="true" /> <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/status/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Campaign_entity/entityfields/status/displayValueProcess.js</displayValueProcess> </entityField> <entityConsumer> <name>KeywordStates</name> @@ -184,10 +185,6 @@ <fieldName>CampaignParticipantsProvider</fieldName> </dependency> <children> - <entityParameter> - <name>ContactId_param</name> - <expose v="true" /> - </entityParameter> <entityParameter> <name>CampaignStepId_param</name> <expose v="true" /> @@ -206,6 +203,12 @@ <entityName>Employee_entity</entityName> <fieldName>Employees</fieldName> </dependency> + <children> + <entityParameter> + <name>OnlyActives_param</name> + <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/employee/children/onlyactives_param/valueProcess.js</valueProcess> + </entityParameter> + </children> </entityConsumer> <entityConsumer> <name>CampaignCosts</name> @@ -271,25 +274,6 @@ </entityParameter> </children> </entityConsumer> - <entityConsumer> - <name>Tasks</name> - <title>Tasks</title> - <dependency> - <name>dependency</name> - <entityName>Task_entity</entityName> - <fieldName>Tasks</fieldName> - </dependency> - <children> - <entityParameter> - <name>ObjectId_param</name> - <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/tasks/children/objectid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>RowId_param</name> - <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/tasks/children/rowid_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> <entityActionField> <name>newActivity</name> <title>New activity</title> @@ -439,26 +423,6 @@ <iconId>VAADIN:CURLY_BRACKETS</iconId> <stateProcess>%aditoprj%/entity/Campaign_entity/entityfields/openadminview/stateProcess.js</stateProcess> </entityActionField> - <entityParameter> - <name>originalCampaignIdCopy_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>description_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>emplContactId_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>name_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>state_param</name> - <expose v="true" /> - </entityParameter> <entityConsumer> <name>Documents</name> <dependency> @@ -516,6 +480,10 @@ <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/keywordcurrency/children/containername_param/valueProcess.js</valueProcess> </entityParameter> + <entityParameter> + <name>OnlyActives_param</name> + <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/keywordcurrency/children/onlyactives_param/valueProcess.js</valueProcess> + </entityParameter> </children> </entityConsumer> <entityField> @@ -552,12 +520,36 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityField> + <name>ACTIVE</name> + </entityField> + <entityParameter> + <name>Copy_param</name> + <expose v="true" /> + </entityParameter> + <entityConsumer> + <name>Tasks</name> + <dependency> + <name>dependency</name> + <entityName>Task_entity</entityName> + <fieldName>Tasks</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectId_param</name> + <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/tasks/children/objectid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>RowId_param</name> + <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/tasks/children/rowid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <dbRecordContainer> <name>db</name> <alias>Data_alias</alias> - <fromClauseProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> <conditionProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/conditionProcess.js</conditionProcess> <onDBInsert>%aditoprj%/entity/Campaign_entity/recordcontainers/db/onDBInsert.js</onDBInsert> <onDBUpdate>%aditoprj%/entity/Campaign_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> @@ -667,6 +659,14 @@ <isFilterable v="true" /> <filtertype>BASIC</filtertype> </consumerMapping> + <dbRecordFieldMapping> + <name>ACTIVE.value</name> + <expression>%aditoprj%/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>EMPLOYEE_CONTACT_ID.displayValue</name> + <expression>%aditoprj%/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <filterExtensions> <filterExtensionSet> @@ -676,53 +676,6 @@ <filterConditionProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/filterextensions/attribute_filter/filterConditionProcess.js</filterConditionProcess> <filtertype>BASIC</filtertype> </filterExtensionSet> - <filterExtension> - <name>DateStart_filter</name> - <title>Startdate</title> - <contentType>DATE</contentType> - <filterConditionProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/filterextensions/datestart_filter/filterConditionProcess.js</filterConditionProcess> - <filtertype>BASIC</filtertype> - </filterExtension> - <filterExtension> - <name>DateEnd_filter</name> - <title>Enddate</title> - <contentType>DATE</contentType> - <filterConditionProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/filterextensions/dateend_filter/filterConditionProcess.js</filterConditionProcess> - <filtertype>BASIC</filtertype> - </filterExtension> - <filterExtension> - <name>Participant_filter</name> - <title>Participants</title> - <contentType>TEXT</contentType> - <filterValuesProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/filterextensions/participant_filter/filterValuesProcess.js</filterValuesProcess> - <filterConditionProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/filterextensions/participant_filter/filterConditionProcess.js</filterConditionProcess> - <filtertype>BASIC</filtertype> - </filterExtension> - <filterExtension> - <name>CampaignStep_filter</name> - <title>Steps</title> - <contentType>TEXT</contentType> - <filterValuesProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/filterextensions/campaignstep_filter/filterValuesProcess.js</filterValuesProcess> - <filterConditionProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/filterextensions/campaignstep_filter/filterConditionProcess.js</filterConditionProcess> - <filtertype>BASIC</filtertype> - </filterExtension> - <filterExtension> - <name>Member_filter</name> - <title>Members</title> - <contentType>TEXT</contentType> - <filterValuesProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/filterextensions/member_filter/filterValuesProcess.js</filterValuesProcess> - <filterConditionProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/filterextensions/member_filter/filterConditionProcess.js</filterConditionProcess> - <filtertype>BASIC</filtertype> - </filterExtension> - <filterExtension> - <name>Favorite_filter</name> - <title>Favoritegroup</title> - <contentType>TEXT</contentType> - <filterValuesProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/filterextensions/favorite_filter/filterValuesProcess.js</filterValuesProcess> - <filterConditionProcess>%aditoprj%/entity/Campaign_entity/recordcontainers/db/filterextensions/favorite_filter/filterConditionProcess.js</filterConditionProcess> - <groupedRecordField></groupedRecordField> - <filtertype>BASIC</filtertype> - </filterExtension> </filterExtensions> </dbRecordContainer> </recordContainers> diff --git a/entity/Campaign_entity/afterUiInit.js b/entity/Campaign_entity/afterUiInit.js index 40048a413712450e39dc819e7142ed9b2a48d820..d71e3ce2b9233ece766c8092979fc69c296d212f 100644 --- a/entity/Campaign_entity/afterUiInit.js +++ b/entity/Campaign_entity/afterUiInit.js @@ -6,4 +6,9 @@ import("Attribute_lib"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) { AttributeRelationUtils.presetMandatoryAttributes(ContextUtils.getCurrentContextId(), "Attributes"); + + if(vars.exists("$param.Copy_param") && vars.get("$param.Copy_param")) + { + neon.setFieldValues(JSON.parse(vars.get("$param.Copy_param"))["FIELDS"]); + } } diff --git a/entity/Campaign_entity/contentDescriptionProcess.js b/entity/Campaign_entity/contentDescriptionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b07a72fe7cc543e3bedc5d5604f12f28769ffb6b --- /dev/null +++ b/entity/Campaign_entity/contentDescriptionProcess.js @@ -0,0 +1,5 @@ +import("system.translate"); +import("system.datetime"); +import("system.vars"); +import("system.result"); +result.string(datetime.toDate(vars.get("$field.DATE_NEW"), translate.text("dd.MM.yyyy"))); \ No newline at end of file diff --git a/entity/Campaign_entity/entityfields/copycampaign/onActionProcess.js b/entity/Campaign_entity/entityfields/copycampaign/onActionProcess.js index d0e4f15cee96a3e7328b2b5d92067f31c8cceaef..10b5370070b7fb3a8afee2313256a569cf4bc5ab 100644 --- a/entity/Campaign_entity/entityfields/copycampaign/onActionProcess.js +++ b/entity/Campaign_entity/entityfields/copycampaign/onActionProcess.js @@ -1,11 +1,11 @@ import("system.vars"); import("Campaign_lib"); -var campaignid = vars.getString("$field.CAMPAIGNID"); -var description = vars.getString("$field.DESCRIPTION"); -var emplContactId = vars.getString("$field.EMPLOYEE_CONTACT_ID"); -var name = vars.getString("$field.NAME"); -var state = vars.getString("$field.STATUS"); +var campaignid = vars.get("$field.CAMPAIGNID"); +var description = vars.get("$field.DESCRIPTION"); +var emplContactId = vars.get("$field.EMPLOYEE_CONTACT_ID"); +var name = vars.get("$field.NAME"); +var state = vars.get("$field.STATUS"); CampaignUtils.copyCampaign(campaignid, description, emplContactId, name, state); \ No newline at end of file diff --git a/entity/Campaign_entity/entityfields/description/valueProcess.js b/entity/Campaign_entity/entityfields/description/valueProcess.js deleted file mode 100644 index f410607cb7949d96ee9b88651ad0d2ae8b82f61c..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/entityfields/description/valueProcess.js +++ /dev/null @@ -1,8 +0,0 @@ -import("system.vars"); -import("system.result"); -import("system.neon"); - -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.description_param") && vars.get("$param.description_param") && !vars.get("$this.value")) -{ - result.string(vars.get("$param.description_param")); -} \ No newline at end of file diff --git a/entity/Campaign_entity/entityfields/employee_contact_id/valueProcess.js b/entity/Campaign_entity/entityfields/employee_contact_id/valueProcess.js index 04046053e32189ddf0521ec4c014092fc503e9e2..4b00f2d048bc22a15174915872c498ea6051b998 100644 --- a/entity/Campaign_entity/entityfields/employee_contact_id/valueProcess.js +++ b/entity/Campaign_entity/entityfields/employee_contact_id/valueProcess.js @@ -3,10 +3,5 @@ import("system.neon"); import("system.vars"); import("Employee_lib"); -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) -{ - if(vars.exists("$param.emplContactId_param") && vars.get("$param.emplContactId_param") && !vars.get("$this.value")) - result.string(vars.get("$param.emplContactId_param")); - else if(vars.get("$this.value") == null) - result.string(EmployeeUtils.getCurrentContactId()); -} \ No newline at end of file +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) + result.string(EmployeeUtils.getCurrentContactId()); \ No newline at end of file diff --git a/entity/Campaign_entity/entityfields/name/valueProcess.js b/entity/Campaign_entity/entityfields/name/valueProcess.js deleted file mode 100644 index 2c8e28aa36ecb0800ec59eccd8579a6a5d31ef10..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/entityfields/name/valueProcess.js +++ /dev/null @@ -1,8 +0,0 @@ -import("system.vars"); -import("system.result"); -import("system.neon"); - -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.name_param") && vars.get("$param.name_param") && !vars.get("$this.value")) -{ - result.string(vars.get("$param.name_param")); -} \ No newline at end of file diff --git a/entity/Campaign_entity/entityfields/status/displayValueProcess.js b/entity/Campaign_entity/entityfields/status/displayValueProcess.js deleted file mode 100644 index 2b82fe77f1e59332c6adfbfa9398714a6b7b2566..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/entityfields/status/displayValueProcess.js +++ /dev/null @@ -1,6 +0,0 @@ -import("system.result"); -import("system.vars"); -import("Keyword_lib"); -import("KeywordRegistry_basic"); - -result.string(KeywordUtils.getViewValue($KeywordRegistry.campaignState(), vars.get("$field.STATUS"))); \ No newline at end of file diff --git a/entity/Campaign_entity/entityfields/status/valueProcess.js b/entity/Campaign_entity/entityfields/status/valueProcess.js index e772e08d2c7b872067cd42a3605f157f9e41f4b9..c3b6c3a036232875d3123ed76e88d24c518a0e7f 100644 --- a/entity/Campaign_entity/entityfields/status/valueProcess.js +++ b/entity/Campaign_entity/entityfields/status/valueProcess.js @@ -1,12 +1,7 @@ +import("KeywordRegistry_basic"); import("system.neon"); import("system.vars"); import("system.result"); -import("KeywordRegistry_basic"); -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) -{ - if(vars.exists("$param.state_param") && vars.get("$param.state_param") && !vars.get("$this.value")) - result.string(vars.get("$param.state_param")); - else if (vars.get("$this.value") == null) - result.string($KeywordRegistry.campaignState$planning()); -} \ No newline at end of file +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) + result.string($KeywordRegistry.campaignState$planning); \ No newline at end of file diff --git a/entity/Campaign_entity/entityfields/tasks/children/objectid_param/valueProcess.js b/entity/Campaign_entity/entityfields/tasks/children/objectid_param/valueProcess.js index 5996e99db232db8df50f155732110608e5abff4e..e8b4e72e74a0a4696ff39e83135aa6100ef908c0 100644 --- a/entity/Campaign_entity/entityfields/tasks/children/objectid_param/valueProcess.js +++ b/entity/Campaign_entity/entityfields/tasks/children/objectid_param/valueProcess.js @@ -1,4 +1,4 @@ -import("system.result"); -import("Context_lib"); - -result.string(ContextUtils.getCurrentContextId()); \ No newline at end of file +import("system.result"); +import("Context_lib"); + +result.string(ContextUtils.getCurrentContextId()); diff --git a/entity/Campaign_entity/entityfields/tasks/children/rowid_param/valueProcess.js b/entity/Campaign_entity/entityfields/tasks/children/rowid_param/valueProcess.js index 44d452d9b78ba56e5498e9044770c98277bbfb2c..3814648f507bd77edb266f38a807c1669e8c5f1e 100644 --- a/entity/Campaign_entity/entityfields/tasks/children/rowid_param/valueProcess.js +++ b/entity/Campaign_entity/entityfields/tasks/children/rowid_param/valueProcess.js @@ -1,4 +1,4 @@ -import("system.vars"); -import("system.result"); - +import("system.vars"); +import("system.result"); + result.string(vars.get("$field.CAMPAIGNID")); \ No newline at end of file diff --git a/entity/Campaign_entity/recordcontainers/db/conditionProcess.js b/entity/Campaign_entity/recordcontainers/db/conditionProcess.js index ea77837ea6f8defb3e4e66200740f5b8614adae5..e5c5faf2b6e2facaaaad245e6858fa3ddec4c0a7 100644 --- a/entity/Campaign_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Campaign_entity/recordcontainers/db/conditionProcess.js @@ -7,11 +7,11 @@ import("Sql_lib"); var recordState = vars.get("$sys.recordstate"); -var condition = newWhere(); +var cond = newWhere(); + if(vars.get("$param.ShowOnlyCurrentUsersCampaigns_param") == 'true') { - condition.and("CAMPAIGN.EMPLOYEE_CONTACT_ID", EmployeeUtils.getCurrentContactId()); + cond.and("CAMPAIGN.EMPLOYEE_CONTACT_ID", EmployeeUtils.getCurrentContactId()); } - -result.string(condition.toString()); \ No newline at end of file +result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Campaign_entity/recordcontainers/db/filterextensions/campaignstep_filter/filterConditionProcess.js b/entity/Campaign_entity/recordcontainers/db/filterextensions/campaignstep_filter/filterConditionProcess.js deleted file mode 100644 index d0dddcc8b370c4307bd88e167744ee1c2be730ac..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/recordcontainers/db/filterextensions/campaignstep_filter/filterConditionProcess.js +++ /dev/null @@ -1,27 +0,0 @@ -import("system.result"); -import("system.vars"); -import("Sql_lib"); -import("Util_lib"); -import("Campaign_lib"); - - -var valueSubSelect = "(select CAMPAIGNSTEPID from CAMPAIGNSTEP where CAMPAIGN.CAMPAIGNID = CAMPAIGNSTEP.CAMPAIGN_ID)"; -var countSubSelect = "(select count(*) from CAMPAIGNSTEP where CAMPAIGNSTEP.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID)"; -var condition = ""; - -switch(vars.get("$local.comparison")) { - case "ISNOTNULL": - condition = countSubSelect + " > 0"; - break; - case "ISNULL": - condition = countSubSelect + " = 0"; - break; - case "NOT_EQUAL": - condition = vars.get("$local.value") + " not in " + valueSubSelect; - break; - case "EQUAL": - condition = vars.get("$local.value") + " in " + valueSubSelect; - break; -} - -result.object(condition); diff --git a/entity/Campaign_entity/recordcontainers/db/filterextensions/campaignstep_filter/filterValuesProcess.js b/entity/Campaign_entity/recordcontainers/db/filterextensions/campaignstep_filter/filterValuesProcess.js deleted file mode 100644 index 13b3ff34c39b81bad62a1a11c9ade92ac14078fc..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/recordcontainers/db/filterextensions/campaignstep_filter/filterValuesProcess.js +++ /dev/null @@ -1,11 +0,0 @@ -import("system.result"); -import("Sql_lib"); - - -var campaignStepValues = new SqlBuilder() - .select("CAMPAIGNSTEPID, NAME") - .from("CAMPAIGNSTEP") - .orderBy("NAME") - .table(); - -result.object(campaignStepValues); \ No newline at end of file diff --git a/entity/Campaign_entity/recordcontainers/db/filterextensions/dateend_filter/filterConditionProcess.js b/entity/Campaign_entity/recordcontainers/db/filterextensions/dateend_filter/filterConditionProcess.js deleted file mode 100644 index c5895859892cd384192c63b347d7c054bb6efc3d..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/recordcontainers/db/filterextensions/dateend_filter/filterConditionProcess.js +++ /dev/null @@ -1,17 +0,0 @@ -import("system.result"); -import("system.vars"); -import("Sql_lib"); -import("Util_lib"); - - -var subSelect = new SqlBuilder() - .select("max(CAMPAIGNSTEP.DATE_END)") - .from("CAMPAIGNSTEP") - .where("CAMPAIGNSTEP.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID") - .toString(); - -subSelect = "(" + subSelect + ")"; - -var condition = StringUtils.replaceAll(vars.get("$local.condition"), vars.get("$local.columnPlaceholder"), subSelect); - -result.object(condition); diff --git a/entity/Campaign_entity/recordcontainers/db/filterextensions/datestart_filter/filterConditionProcess.js b/entity/Campaign_entity/recordcontainers/db/filterextensions/datestart_filter/filterConditionProcess.js deleted file mode 100644 index 2d15b9e58f29554efe52a565d2033e5ba2f448ab..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/recordcontainers/db/filterextensions/datestart_filter/filterConditionProcess.js +++ /dev/null @@ -1,17 +0,0 @@ -import("system.result"); -import("system.vars"); -import("Sql_lib"); -import("Util_lib"); - - -var subSelect = new SqlBuilder() - .select("min(CAMPAIGNSTEP.DATE_START)") - .from("CAMPAIGNSTEP") - .where("CAMPAIGNSTEP.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID") - .toString(); - -subSelect = "(" + subSelect + ")"; - -var condition = StringUtils.replaceAll(vars.get("$local.condition"), vars.get("$local.columnPlaceholder"), subSelect); - -result.object(condition); diff --git a/entity/Campaign_entity/recordcontainers/db/filterextensions/favorite_filter/filterConditionProcess.js b/entity/Campaign_entity/recordcontainers/db/filterextensions/favorite_filter/filterConditionProcess.js deleted file mode 100644 index 5a2fdfdb69a4f0e0b4e752d9bb6cfff63e45f76e..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/recordcontainers/db/filterextensions/favorite_filter/filterConditionProcess.js +++ /dev/null @@ -1,11 +0,0 @@ -import("Favorites_lib"); -import("system.result"); -import("Sql_lib"); - -var favoFilterCond = newWhere(); -var rowIds = FavoritesUtil.getRowIdsOfFavoriteGroup(); - -for(i = 0; i < rowIds.length; i++) - favoFilterCond.or("CAMPAIGN.CAMPAIGNID", rowIds[i], SqlBuilder.EQUAL()); - -result.string(favoFilterCond.toString()); \ No newline at end of file diff --git a/entity/Campaign_entity/recordcontainers/db/filterextensions/favorite_filter/filterValuesProcess.js b/entity/Campaign_entity/recordcontainers/db/filterextensions/favorite_filter/filterValuesProcess.js deleted file mode 100644 index 419128ca73fe597afc7ca4aeed50b28e610206ec..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/recordcontainers/db/filterextensions/favorite_filter/filterValuesProcess.js +++ /dev/null @@ -1,5 +0,0 @@ -import("Context_lib"); -import("system.result"); -import("Favorites_lib"); - -result.object(FavoritesUtil.getUserFavoriteGroupsByContext(ContextUtils.getCurrentContextId())); \ No newline at end of file diff --git a/entity/Campaign_entity/recordcontainers/db/filterextensions/member_filter/filterConditionProcess.js b/entity/Campaign_entity/recordcontainers/db/filterextensions/member_filter/filterConditionProcess.js deleted file mode 100644 index 48c84a8dcbb02d59429f6b681c2186b3c1767b6b..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/recordcontainers/db/filterextensions/member_filter/filterConditionProcess.js +++ /dev/null @@ -1,26 +0,0 @@ -import("system.result"); -import("system.vars"); -import("Sql_lib"); -import("Util_lib"); - - -var valueSubSelect = "(select CONTACT_ID from OBJECTMEMBER where OBJECTMEMBER.OBJECT_ROWID = CAMPAIGN.CAMPAIGNID)"; -var countSubSelect = "(select count(*) from OBJECTMEMBER where OBJECTMEMBER.OBJECT_ROWID = CAMPAIGN.CAMPAIGNID)"; -var condition = ""; - -switch(vars.get("$local.comparison")) { - case "ISNOTNULL": - condition = countSubSelect + " > 0"; - break; - case "ISNULL": - condition = countSubSelect + " = 0"; - break; - case "NOT_EQUAL": - condition = vars.get("$local.value") + " not in " + valueSubSelect; - break; - case "EQUAL": - condition = vars.get("$local.value") + " in " + valueSubSelect; - break; -} - -result.object(condition); diff --git a/entity/Campaign_entity/recordcontainers/db/filterextensions/member_filter/filterValuesProcess.js b/entity/Campaign_entity/recordcontainers/db/filterextensions/member_filter/filterValuesProcess.js deleted file mode 100644 index 569b13dcd324261da56d6e462a80f7b0a718c1df..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/recordcontainers/db/filterextensions/member_filter/filterValuesProcess.js +++ /dev/null @@ -1,13 +0,0 @@ -import("system.result"); -import("Sql_lib"); -import("Person_lib"); - - -var query = new SqlBuilder() - .select("OBJECTMEMBER.CONTACT_ID, (" + PersUtils.getResolvingDisplaySubSql("OBJECTMEMBER.CONTACT_ID") + ") as C") - .from("OBJECTMEMBER") - .join("CAMPAIGN", "OBJECTMEMBER.OBJECT_ROWID = CAMPAIGN.CAMPAIGNID") - .join("CONTACT", "OBJECTMEMBER.CONTACT_ID = CONTACT.CONTACTID") - ; - -result.object(query.table()); \ No newline at end of file diff --git a/entity/Campaign_entity/recordcontainers/db/filterextensions/participant_filter/filterConditionProcess.js b/entity/Campaign_entity/recordcontainers/db/filterextensions/participant_filter/filterConditionProcess.js deleted file mode 100644 index be23e1087b366a1211fadd6672a3ac0a0e9de033..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/recordcontainers/db/filterextensions/participant_filter/filterConditionProcess.js +++ /dev/null @@ -1,26 +0,0 @@ -import("system.result"); -import("system.vars"); -import("Sql_lib"); -import("Util_lib"); - - -var valueSubSelect = "(select CONTACT_ID from CAMPAIGNPARTICIPANT where CAMPAIGNPARTICIPANT.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID)"; -var countSubSelect = "(select count(*) from CAMPAIGNPARTICIPANT where CAMPAIGNPARTICIPANT.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID)"; -var condition = ""; - -switch(vars.get("$local.comparison")) { - case "ISNOTNULL": - condition = countSubSelect + " > 0"; - break; - case "ISNULL": - condition = countSubSelect + " = 0"; - break; - case "NOT_EQUAL": - condition = vars.get("$local.value") + " not in " + valueSubSelect; - break; - case "EQUAL": - condition = vars.get("$local.value") + " in " + valueSubSelect; - break; -} - -result.object(condition); diff --git a/entity/Campaign_entity/recordcontainers/db/filterextensions/participant_filter/filterValuesProcess.js b/entity/Campaign_entity/recordcontainers/db/filterextensions/participant_filter/filterValuesProcess.js deleted file mode 100644 index 0ff2d9c975bfceec9ad15b02e8b0a921abf3081b..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/recordcontainers/db/filterextensions/participant_filter/filterValuesProcess.js +++ /dev/null @@ -1,16 +0,0 @@ -import("system.result"); -import("Sql_lib"); -import("Person_lib"); - - -var contactDisplaySelect = "case when CONTACT.PERSON_ID is null" - + " then (select ORGANISATION.NAME FROM ORGANISATION join CONTACT on CONTACT.ORGANISATION_ID = ORGANISATION.ORGANISATIONID where CONTACT.CONTACTID = CAMPAIGNPARTICIPANT.CONTACT_ID)" - + " else (" + PersUtils.getResolvingDisplaySubSql("CAMPAIGNPARTICIPANT.CONTACT_ID") + ")" - + " end"; -var query = new SqlBuilder() - .select("distinct CAMPAIGNPARTICIPANT.CONTACT_ID, (" + contactDisplaySelect + ") as C") - .from("CAMPAIGNPARTICIPANT") - .join("CONTACT on CAMPAIGNPARTICIPANT.CONTACT_ID = CONTACT.CONTACTID", "", "", "inner") - ; - -result.object(query.table()); \ No newline at end of file diff --git a/entity/Campaign_entity/recordcontainers/db/fromClauseProcess.js b/entity/Campaign_entity/recordcontainers/db/fromClauseProcess.js deleted file mode 100644 index f1704c63ce08d64a2b42eaa2192c87e929b2c290..0000000000000000000000000000000000000000 --- a/entity/Campaign_entity/recordcontainers/db/fromClauseProcess.js +++ /dev/null @@ -1,17 +0,0 @@ -import("system.result"); -import("system.neon"); -import("system.vars"); - - -var recordState = vars.get("$sys.recordstate"); -var res = "CAMPAIGN"; - -if (recordState != neon.OPERATINGSTATE_NEW && recordState != neon.OPERATINGSTATE_EDIT) { - res += " join (select min(DATE_START) as STEPDATESTART_ALIAS, CAMPAIGN_ID from CAMPAIGNSTEP group by CAMPAIGN_ID) STEPDATESTART_TABLEALIAS" - + " on STEPDATESTART_TABLEALIAS.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID " - + " join (select max(DATE_END) as STEPDATEEND_ALIAS, CAMPAIGN_ID from CAMPAIGNSTEP group by CAMPAIGN_ID) STEPDATEEND_TABLEALIAS" - + " on STEPDATEEND_TABLEALIAS.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID "; - -} - -result.string(res); diff --git a/entity/Campaign_entity/recordcontainers/db/onDBInsert.js b/entity/Campaign_entity/recordcontainers/db/onDBInsert.js index 3c0830aabedeb8f5a85b0d97704ef810d06b9002..ecc62088cac7fd1e7ee7b449554330682ae3a4e2 100644 --- a/entity/Campaign_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Campaign_entity/recordcontainers/db/onDBInsert.js @@ -12,8 +12,8 @@ import("Campaign_lib"); var rowdata = vars.get("$local.rowdata"); var campaignId = vars.get("$local.uid"); -if (vars.get("$param.originalCampaignIdCopy_param")) - CampaignUtils.copyCampaignSteps(vars.getString("$param.originalCampaignIdCopy_param"), campaignId); +if (vars.get("$param.Copy_param")) + CampaignUtils.copyCampaignSteps(JSON.parse(vars.get("$param.Copy_param"))["CAMPAIGNID"], campaignId); else { var threeWeeks = datetime.ONE_WEEK * 3; diff --git a/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js b/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..0c4da8fb72e3474ab6980b621c9139a560e21b09 --- /dev/null +++ b/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js @@ -0,0 +1,6 @@ +import("Context_lib"); +import("system.result"); +import("KeywordRegistry_basic"); + +var activArr = [$KeywordRegistry.campaignState$planning(), $KeywordRegistry.campaignState$approved()]; +result.string(ContextUtils.buildActiveCaseWhen(activArr, "CAMPAIGN.STATUS")); \ No newline at end of file diff --git a/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/date_end.value/expression.js b/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/date_end.value/expression.js index 510c61f479969118c5e33f8c21cf3861579d0f64..26ead684de6fdd3d812a023a30963789747605ab 100644 --- a/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/date_end.value/expression.js +++ b/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/date_end.value/expression.js @@ -1,12 +1,4 @@ -import("system.neon"); import("system.result"); -import("system.vars"); +import("Sql_lib"); - -var recordState = vars.get("$sys.recordstate"); - -if (recordState != neon.OPERATINGSTATE_NEW && recordState != neon.OPERATINGSTATE_EDIT) { - result.string("STEPDATEEND_ALIAS"); -} else { - result.string("0"); -} +result.string(newSelect("max(CAMPAIGNSTEP.DATE_END)").from("CAMPAIGNSTEP").where("CAMPAIGNSTEP.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID").toString()); \ No newline at end of file diff --git a/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/date_start.value/expression.js b/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/date_start.value/expression.js index 77d1b3dde659a3522bd8f4f6d682a091a8a13dc0..4659e92e558e26b8a60f3f37622a934793ac4f21 100644 --- a/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/date_start.value/expression.js +++ b/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/date_start.value/expression.js @@ -1,12 +1,5 @@ import("system.neon"); import("system.result"); -import("system.vars"); +import("Sql_lib"); - -var recordState = vars.get("$sys.recordstate"); - -if (recordState != neon.OPERATINGSTATE_NEW && recordState != neon.OPERATINGSTATE_EDIT) { - result.string("STEPDATESTART_ALIAS"); -} else { - result.string("0"); -} \ No newline at end of file +result.string(newSelect("min(CAMPAIGNSTEP.DATE_START)").from("CAMPAIGNSTEP").where("CAMPAIGNSTEP.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID").toString()); \ No newline at end of file diff --git a/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js b/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..f0023d115c5071a9e86a99a3f9624b169018f820 --- /dev/null +++ b/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/employee_contact_id.displayvalue/expression.js @@ -0,0 +1,3 @@ +import("Person_lib"); +import("system.result"); +result.string(PersUtils.getResolvingDisplaySubSql("CAMPAIGN.EMPLOYEE_CONTACT_ID")); \ No newline at end of file diff --git a/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js b/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js index f67e50c289fe9587d704ded87665c5abce6509b5..d5024a1449de08a93db1ac0d8d642c2b1e5a4ceb 100644 --- a/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js +++ b/entity/Campaign_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js @@ -1,6 +1,6 @@ -import("system.result"); -import("Keyword_lib"); import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.result"); var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.campaignState(), "CAMPAIGN.STATUS"); result.string(sql); \ No newline at end of file diff --git a/entity/ClassificationGroup_entity/recordcontainers/db/conditionProcess.js b/entity/ClassificationGroup_entity/recordcontainers/db/conditionProcess.js index 2d43dba815cd2dea8e2a5eeb8335aa36c8e3746c..e0b2732445777e17d096a1122bde6538fa369a47 100644 --- a/entity/ClassificationGroup_entity/recordcontainers/db/conditionProcess.js +++ b/entity/ClassificationGroup_entity/recordcontainers/db/conditionProcess.js @@ -16,5 +16,4 @@ if (objectType) .from("CLASSIFICATIONTYPE") .where("CLASSIFICATIONTYPE.OBJECT_TYPE", objectType), SqlBuilder.IN()); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/ClassificationScore_entity/recordcontainers/db/conditionProcess.js b/entity/ClassificationScore_entity/recordcontainers/db/conditionProcess.js index 10dbbac6efbdb80f576dab966afa19ede6ffb645..2cc442f6f758f5c33128f5cd38ba37b44c2c00f8 100644 --- a/entity/ClassificationScore_entity/recordcontainers/db/conditionProcess.js +++ b/entity/ClassificationScore_entity/recordcontainers/db/conditionProcess.js @@ -3,5 +3,4 @@ import("Sql_lib"); import("system.db"); import("system.result"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(newWhereIfSet("CLASSIFICATIONSCORE.CLASSIFICATIONTYPE_ID", "$param.ClassificationTypeId_param").toString()); \ No newline at end of file diff --git a/entity/Classification_entity/recordcontainers/jdito/contentProcess.js b/entity/Classification_entity/recordcontainers/jdito/contentProcess.js index 78879bee92567449a5ca43c6ef616d91d236a62f..9af7e2ab58bfb43d0f1fcbfa4c0b35f42ad13c23 100644 --- a/entity/Classification_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Classification_entity/recordcontainers/jdito/contentProcess.js @@ -161,5 +161,12 @@ function _updateScore() var values = [calculatedClassification]; if(storedClassification[1] != undefined && calculatedClassification != storedClassification[1]) //Update the stored classification if the freshly calculated one differs - newWhere("CLASSIFICATIONSTORAGE.CLASSIFICATIONSTORAGEID", storedClassification[0]).updateData(true, table, columns, null, values); + { + newWhere("CLASSIFICATIONSTORAGE.CLASSIFICATIONSTORAGEID", storedClassification[0]).updateData(true, table, columns, null, values); + } + else if(storedClassification[1] == undefined) //insert if no classificationstorage exists yet + { + db.insertData(table, ["CLASSIFICATIONSTORAGEID", "CLASSIFICATIONVALUE", "OBJECT_ROWID", "OBJECT_TYPE"], null, + [util.getNewUUID(), calculatedClassification, objectRowIdParam, objectTypeParam]) + } } \ No newline at end of file diff --git a/entity/CommRestriction_Entity/recordcontainers/db/conditionProcess.js b/entity/CommRestriction_Entity/recordcontainers/db/conditionProcess.js index 4a714c57054e0ee4bd91998185d6157db848cb7f..035d01b5f3e1adb6f2dc0f6a9b1a46153cb5b327 100644 --- a/entity/CommRestriction_Entity/recordcontainers/db/conditionProcess.js +++ b/entity/CommRestriction_Entity/recordcontainers/db/conditionProcess.js @@ -4,5 +4,4 @@ import("Sql_lib"); var cond = newWhereIfSet("COMMRESTRICTION.CONTACT_ID", "$param.ContactId_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Communication_entity/entityfields/addr/contentTypeProcess.js b/entity/Communication_entity/entityfields/addr/contentTypeProcess.js index 25141c53776680b9c9c714926c752fda5419deaa..249c9ed0275f8f6dc97e9986016da4b85d48501f 100644 --- a/entity/Communication_entity/entityfields/addr/contentTypeProcess.js +++ b/entity/Communication_entity/entityfields/addr/contentTypeProcess.js @@ -4,7 +4,6 @@ import("system.vars"); import("system.result"); import("system.neon"); -//TODO: add constants for contentTypes #1022547 var medium = vars.get("$field.MEDIUM_ID"); var contentType; if (medium) diff --git a/entity/Communication_entity/recordcontainers/db/conditionProcess.js b/entity/Communication_entity/recordcontainers/db/conditionProcess.js index 39f447f1fe79e21b1235025d2c5859cee0a33c23..ec18465d42f9bcc87f5b557653b021a94438c14c 100644 --- a/entity/Communication_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Communication_entity/recordcontainers/db/conditionProcess.js @@ -13,5 +13,4 @@ if (vars.getString("$param.CommMediumIds_param")) var mediumIds = JSON.parse(vars.getString("$param.CommMediumIds_param")); cond.andIfSet("COMMUNICATION.MEDIUM_ID", mediumIds, SqlBuilder.IN()); } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Competition_entity/Competition_entity.aod b/entity/Competition_entity/Competition_entity.aod index ac91f28ee4dbfaeaea563112aca8d9ae0bd288f3..7e7298fd9a765e1d86d25f31a58607192495dc05 100644 --- a/entity/Competition_entity/Competition_entity.aod +++ b/entity/Competition_entity/Competition_entity.aod @@ -374,10 +374,6 @@ <name>PHASE.value</name> <recordfield>COMPETITION.PHASE</recordfield> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>OBJECT_ROWID.displayValue</name> - <expression>%aditoprj%/entity/Competition_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js</expression> - </dbRecordFieldMapping> <dbRecordFieldMapping> <name>COMPETITIONID.value</name> <recordfield>COMPETITION.COMPETITIONID</recordfield> diff --git a/entity/Competition_entity/entityfields/object_rowid/displayValueProcess.js b/entity/Competition_entity/entityfields/object_rowid/displayValueProcess.js index 8b080bceea92c146a676b0f33cc7cb87d4e86b9d..95c4eea5367140dc2d81e470ba0607adf52f07c1 100644 --- a/entity/Competition_entity/entityfields/object_rowid/displayValueProcess.js +++ b/entity/Competition_entity/entityfields/object_rowid/displayValueProcess.js @@ -7,5 +7,5 @@ import("Context_lib"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$field.OBJECT_ROWID")) { result.string(""); } else if (vars.exists("$field.OBJECT_TYPE") && vars.get("$field.OBJECT_TYPE")) { - result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID")))); + result.string(ContextUtils.getTitleByContext(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID"))); } \ No newline at end of file diff --git a/entity/Competition_entity/recordcontainers/db/conditionProcess.js b/entity/Competition_entity/recordcontainers/db/conditionProcess.js index 7fdde447ee0c40d4ad260e0392be5c9efe6e345b..79b1357d5be15475ab5c0ec0b2f3b95e8b42d12b 100644 --- a/entity/Competition_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Competition_entity/recordcontainers/db/conditionProcess.js @@ -6,5 +6,4 @@ var cond = newWhere() .andIfSet("COMPETITION.OBJECT_ROWID", "$param.ObjectRowId_param") .andIfSet("COMPETITION.OBJECT_TYPE", "$param.ObjectType_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); diff --git a/entity/Competition_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js b/entity/Competition_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js deleted file mode 100644 index fb69d484cfa8fc6aa1c45987d94b793c35efd20a..0000000000000000000000000000000000000000 --- a/entity/Competition_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.result"); -import("Context_lib"); - -result.string(ContextUtils.getNameSubselectSql("COMPETITION.OBJECT_TYPE", "COMPETITION.OBJECT_ROWID")) \ No newline at end of file diff --git a/entity/Contact_entity/recordcontainers/db/conditionProcess.js b/entity/Contact_entity/recordcontainers/db/conditionProcess.js index 6f1b0fc9fbbbe71f274f50189be2dfb360c306f2..80af2eaae28bdb8c9e2f0c707256a507acd83d67 100644 --- a/entity/Contact_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Contact_entity/recordcontainers/db/conditionProcess.js @@ -7,5 +7,4 @@ var cond = newWhere() .andIfSet("CONTACT.CONTACTID", "$param.OwnContactId_param", SqlBuilder.NOT_EQUAL()) .andIfSet("CONTACT.PERSON_ID", "$param.PersonId_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Context_entity/Context_entity.aod b/entity/Context_entity/Context_entity.aod index c82aab16b52506b32800ef2f9635b260fffa3d6b..a8e3222ec7e8946419c18e8a795c0bf427a244e6 100644 --- a/entity/Context_entity/Context_entity.aod +++ b/entity/Context_entity/Context_entity.aod @@ -108,11 +108,6 @@ </entityParameter> </children> </entityProvider> - <entityParameter> - <name>GetAllContexts_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> <entityParameter> <name>InvertBlacklist_param</name> <expose v="true" /> diff --git a/entity/Context_entity/recordcontainers/jdito/contentProcess.js b/entity/Context_entity/recordcontainers/jdito/contentProcess.js index 25682212551e2b430d137096dd04818e97fbfb5f..1bdca6e2fa31e0c1fb90a38136dbc6af182d38b0 100644 --- a/entity/Context_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Context_entity/recordcontainers/jdito/contentProcess.js @@ -4,7 +4,6 @@ import("Context_lib"); var blacklist var invertBlacklist -var filterContexts = vars.get("$param.GetAllContexts_param") != "true"; var whitelist; if (vars.get("$local.idvalues") && vars.get("$local.idvalues").length > 0) @@ -23,4 +22,4 @@ else invertBlacklist = vars.get("$param.InvertBlacklist_param") == "true"; } -result.object(ContextUtils.getContexts(filterContexts, blacklist, invertBlacklist)); \ No newline at end of file +result.object(ContextUtils.getContexts(blacklist, invertBlacklist)); \ No newline at end of file diff --git a/entity/Contract_entity/Contract_entity.aod b/entity/Contract_entity/Contract_entity.aod index 273e731918f9e43fbd9259ff07c9dc9ec8123887..3281aae04f01796444be478eb344530931f2c173 100644 --- a/entity/Contract_entity/Contract_entity.aod +++ b/entity/Contract_entity/Contract_entity.aod @@ -6,6 +6,7 @@ <title>Contract</title> <grantDeleteProcess>%aditoprj%/entity/Contract_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/Contract_entity/contentTitleProcess.js</contentTitleProcess> + <contentDescriptionProcess>%aditoprj%/entity/Contract_entity/contentDescriptionProcess.js</contentDescriptionProcess> <afterUiInit>%aditoprj%/entity/Contract_entity/afterUiInit.js</afterUiInit> <onValidation>%aditoprj%/entity/Contract_entity/onValidation.js</onValidation> <useFavorites v="true" /> @@ -101,7 +102,14 @@ </entityField> <entityProvider> <name>Contracts</name> + <documentation>%aditoprj%/entity/Contract_entity/entityfields/contracts/documentation.adoc</documentation> <recordContainer>db</recordContainer> + <children> + <entityParameter> + <name>ContactId_param</name> + <expose v="true" /> + </entityParameter> + </children> <dependencies> <entityDependency> <name>6d7c7166-84b4-4da2-9a48-cc1e390ac987</name> @@ -116,12 +124,6 @@ <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>ContactId_param</name> - <expose v="true" /> - </entityParameter> - </children> </entityProvider> <entityParameter> <name>ContactId_param</name> @@ -147,11 +149,6 @@ </entityFieldGroup> <entityConsumer> <name>Activities</name> - <dependency> - <name>dependency</name> - <entityName>Activity_entity</entityName> - <fieldName>LinkedObjects</fieldName> - </dependency> <children> <entityParameter> <name>RowId_param</name> @@ -166,6 +163,11 @@ <valueProcess>%aditoprj%/entity/Contract_entity/entityfields/activities/children/presetlinks_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Activity_entity</entityName> + <fieldName>LinkedObjects</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>AnyContacts</name> @@ -206,11 +208,6 @@ <entityConsumer> <name>Documents</name> <selectionMode>MULTI</selectionMode> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>Documents</fieldName> - </dependency> <children> <entityParameter> <name>AssignmentRowId_param</name> @@ -221,15 +218,15 @@ <valueProcess>%aditoprj%/entity/Contract_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>MainDocuments</name> - <stateProcess>%aditoprj%/entity/Contract_entity/entityfields/maindocuments/stateProcess.js</stateProcess> <dependency> <name>dependency</name> <entityName>Document_entity</entityName> - <fieldName>MainDocuments</fieldName> + <fieldName>Documents</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>MainDocuments</name> + <stateProcess>%aditoprj%/entity/Contract_entity/entityfields/maindocuments/stateProcess.js</stateProcess> <children> <entityParameter> <name>AssignmentRowId_param</name> @@ -240,14 +237,14 @@ <valueProcess>%aditoprj%/entity/Contract_entity/entityfields/maindocuments/children/assignmenttable_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>ContractPayments</name> <dependency> <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> + <entityName>Document_entity</entityName> + <fieldName>MainDocuments</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>ContractPayments</name> <children> <entityParameter> <name>ContainerName_param</name> @@ -255,14 +252,14 @@ <expose v="false" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>ContractStates</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>ContractStates</name> <children> <entityParameter> <name>ContainerName_param</name> @@ -270,14 +267,14 @@ <expose v="false" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>ContractTypes</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>ContractTypes</name> <children> <entityParameter> <name>ContainerName_param</name> @@ -285,6 +282,11 @@ <expose v="false" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityActionField> <name>newActivity</name> @@ -298,11 +300,6 @@ <name>Attributes</name> <stateProcess>%aditoprj%/entity/Contract_entity/entityfields/attributes/stateProcess.js</stateProcess> <onValidation>%aditoprj%/entity/Contract_entity/entityfields/attributes/onValidation.js</onValidation> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>AttributeRelations</fieldName> - </dependency> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -315,15 +312,15 @@ <expose v="false" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>AttributeTree</name> - <stateProcess>%aditoprj%/entity/Contract_entity/entityfields/attributetree/stateProcess.js</stateProcess> <dependency> <name>dependency</name> <entityName>AttributeRelation_entity</entityName> - <fieldName>TreeProvider</fieldName> + <fieldName>AttributeRelations</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>AttributeTree</name> + <stateProcess>%aditoprj%/entity/Contract_entity/entityfields/attributetree/stateProcess.js</stateProcess> <children> <entityParameter> <name>ObjectType_param</name> @@ -334,15 +331,15 @@ <valueProcess>%aditoprj%/entity/Contract_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>TreeProvider</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Tasks</name> <stateProcess>%aditoprj%/entity/Contract_entity/entityfields/tasks/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>Task_entity</entityName> - <fieldName>Tasks</fieldName> - </dependency> <children> <entityParameter> <name>ObjectId_param</name> @@ -357,6 +354,11 @@ <valueProcess>%aditoprj%/entity/Contract_entity/entityfields/tasks/children/presetlinks_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Task_entity</entityName> + <fieldName>Tasks</fieldName> + </dependency> </entityConsumer> <entityActionField> <name>newTask</name> @@ -366,17 +368,17 @@ </entityActionField> <entityConsumer> <name>LogHistories</name> - <dependency> - <name>dependency</name> - <entityName>LogHistory_entity</entityName> - <fieldName>LogHistoryProvider</fieldName> - </dependency> <children> <entityParameter> <name>tablenames_param</name> <valueProcess>%aditoprj%/entity/Contract_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>LogHistory_entity</entityName> + <fieldName>LogHistoryProvider</fieldName> + </dependency> </entityConsumer> <entityActionField> <name>openAdminView</name> @@ -402,6 +404,12 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityField> + <name>DATE_NEW</name> + </entityField> + <entityField> + <name>ACTIVE</name> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -544,6 +552,14 @@ <recordfield>CONTRACT.CONTRACTID</recordfield> <aggregateType>COUNT</aggregateType> </aggregateFieldDbMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>CONTRACT.CONTRACTSTART</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ACTIVE.value</name> + <expression>%aditoprj%/entity/Contract_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <filterExtensions> <filterExtensionSet> diff --git a/entity/Contract_entity/contentDescriptionProcess.js b/entity/Contract_entity/contentDescriptionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..03f72c03ff0708d82c613a2253e47b469662ff8c --- /dev/null +++ b/entity/Contract_entity/contentDescriptionProcess.js @@ -0,0 +1,16 @@ +import("system.translate"); +import("system.datetime"); +import("system.vars"); +import("system.result"); + +var res = [translate.text("Payment method") + ": " + vars.get("$field.PAYMENT.displayValue")]; + +if(vars.get("$field.CONTRACTDUE")) + res.push(translate.text("Next due date") + ": " + vars.get("$field.CONTRACTDUE")); + +if(vars.get("$field.CONTRACTEND")) + res.push(translate.text("Contract expiry date") + ": " + vars.get("$field.CONTRACTEND")) + +res.push(translate.text("Creation date") + ": " + datetime.toDate(vars.get("$field.DATE_NEW"), translate.text("dd.MM.yyyy"))); + +result.string(res.join(" | ")); \ No newline at end of file diff --git a/entity/Contract_entity/contentTitleProcess.js b/entity/Contract_entity/contentTitleProcess.js index 302a1d406e496a03d1f78d114d81592e4cf79582..94a08f9ad5c27a46b15210f60b0b6e9f58cba875 100644 --- a/entity/Contract_entity/contentTitleProcess.js +++ b/entity/Contract_entity/contentTitleProcess.js @@ -1,4 +1,6 @@ import("system.vars"); import("system.result"); -result.string(vars.get("$field.CONTRACTCODE_DISPLAY_fieldGroup")); \ No newline at end of file +var res = [vars.get("$field.CONTRACTCODE_DISPLAY_fieldGroup"), vars.get("$field.CONTRACTSTATUS.displayValue")]; + +result.string(res.join(" | ")); \ No newline at end of file diff --git a/entity/Contract_entity/entityfields/contracts/documentation.adoc b/entity/Contract_entity/entityfields/contracts/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..d329bb27a710b109b2a31416e72c432e1ac947ec --- /dev/null +++ b/entity/Contract_entity/entityfields/contracts/documentation.adoc @@ -0,0 +1,3 @@ += Contracts + +Provides the contracts that are linked with a contact. \ No newline at end of file diff --git a/entity/Contract_entity/recordcontainers/db/conditionProcess.js b/entity/Contract_entity/recordcontainers/db/conditionProcess.js index 0fc49f960a068a0e10aa355fe661c104cb8db537..80390ca2afca4cb07cf9c4de21b819375b4601c6 100644 --- a/entity/Contract_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Contract_entity/recordcontainers/db/conditionProcess.js @@ -5,5 +5,4 @@ import("Sql_lib"); var cond = newWhereIfSet("CONTRACT.CONTACT_ID", "$param.ContactId_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); diff --git a/entity/Contract_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js b/entity/Contract_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..d788aeadb9234f464203300da1dac4661fcb9d11 --- /dev/null +++ b/entity/Contract_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js @@ -0,0 +1,6 @@ +import("Context_lib"); +import("system.result"); +import("KeywordRegistry_basic"); + +var activArr = [$KeywordRegistry.contractState$validLimited(), $KeywordRegistry.contractState$validUnlimited(), $KeywordRegistry.contractState$notSigned()]; +result.string(ContextUtils.buildActiveCaseWhen(activArr, "CONTRACT.CONTRACTSTATUS")); \ No newline at end of file diff --git a/entity/DSGVOInfo_entity/recordcontainers/db/conditionProcess.js b/entity/DSGVOInfo_entity/recordcontainers/db/conditionProcess.js index 0135f590498ce6e715386047a43ac6219af36a35..14a93daf75f5f4b3c32a037f7a98840a32adaa66 100644 --- a/entity/DSGVOInfo_entity/recordcontainers/db/conditionProcess.js +++ b/entity/DSGVOInfo_entity/recordcontainers/db/conditionProcess.js @@ -2,6 +2,5 @@ import("system.db"); import("system.result"); import("Sql_lib"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(newWhere("DSGVOINFO.CONTACT_ID", "$param.ContactId_param").toString()) \ No newline at end of file diff --git a/entity/DescriptionTranslation_entity/recordcontainers/db/conditionProcess.js b/entity/DescriptionTranslation_entity/recordcontainers/db/conditionProcess.js index 9b60a2f7aecaea90d458fba6ecff1b8f6aa41a7b..daa85fa01b438eb9728e27f28be4c808d7b25040 100644 --- a/entity/DescriptionTranslation_entity/recordcontainers/db/conditionProcess.js +++ b/entity/DescriptionTranslation_entity/recordcontainers/db/conditionProcess.js @@ -4,6 +4,5 @@ import("Sql_lib"); var cond = newWhere() .andIfSet("DESCRIPTIONTRANSLATION.OBJECT_TYPE", "$param.ObjectType_param") .andIfSet("DESCRIPTIONTRANSLATION.OBJECT_ROWID", "$param.ObjectRowid_param"); - -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 + result.string(cond.toString()); \ No newline at end of file diff --git a/entity/DocumentTemplateLink_entity/recordcontainers/db/conditionProcess.js b/entity/DocumentTemplateLink_entity/recordcontainers/db/conditionProcess.js index 72212f07978dfd9e4d0d8b8f670a0a3e08316621..0c634187ccb1d78964c27dccf2118f95aa72078d 100644 --- a/entity/DocumentTemplateLink_entity/recordcontainers/db/conditionProcess.js +++ b/entity/DocumentTemplateLink_entity/recordcontainers/db/conditionProcess.js @@ -4,5 +4,4 @@ import("Sql_lib"); var cond = newWhereIfSet("DOCUMENTTEMPLATELINK.DOCUMENTTEMPLATE_ID_PARENT", "$param.DocumentId_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/DocumentTemplatePlaceOfUse_entity/DocumentTemplatePlaceOfUse_entity.aod b/entity/DocumentTemplatePlaceOfUse_entity/DocumentTemplatePlaceOfUse_entity.aod index 6db556011a3702c802f4b5a1c3ade5dcb8e172b2..3e77638a51c83f4a8c4826e1659f807b55198c97 100644 --- a/entity/DocumentTemplatePlaceOfUse_entity/DocumentTemplatePlaceOfUse_entity.aod +++ b/entity/DocumentTemplatePlaceOfUse_entity/DocumentTemplatePlaceOfUse_entity.aod @@ -43,10 +43,6 @@ <name>Blacklist_param</name> <valueProcess>%aditoprj%/entity/DocumentTemplatePlaceOfUse_entity/entityfields/contextdocumenttemplateplaceofuse/children/blacklist_param/valueProcess.js</valueProcess> </entityParameter> - <entityParameter> - <name>GetAllContexts_param</name> - <valueProcess>%aditoprj%/entity/DocumentTemplatePlaceOfUse_entity/entityfields/contextdocumenttemplateplaceofuse/children/getallcontexts_param/valueProcess.js</valueProcess> - </entityParameter> </children> </entityConsumer> <entityProvider> diff --git a/entity/DocumentTemplateTypeCategory_entity/recordcontainers/db/conditionProcess.js b/entity/DocumentTemplateTypeCategory_entity/recordcontainers/db/conditionProcess.js index 42e83fc6e021aace37f74c3de356acc19c11a2d0..0cec405b433c9f43d6e536f471fb001b9da9ac43 100644 --- a/entity/DocumentTemplateTypeCategory_entity/recordcontainers/db/conditionProcess.js +++ b/entity/DocumentTemplateTypeCategory_entity/recordcontainers/db/conditionProcess.js @@ -19,5 +19,4 @@ if (usageFilter) , SqlBuilder.IN()); } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/onActionProcess.js b/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/onActionProcess.js index 97975318752c70994cb062d3105de9a3efc6df24..841ff10b1844fa44c81a817f99987d1ff2f42db7 100644 --- a/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/onActionProcess.js +++ b/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/onActionProcess.js @@ -1,11 +1,9 @@ import("system.neon"); import("system.vars"); -neon.openContext("MSTTeamDocument", null, null, neon.OPERATINGSTATE_NEW, { +neon.openContext("MSTTeamsDocument", "MSTeamsDocumentEdit_view", null, neon.OPERATINGSTATE_VIEW, { "MSTTeamId_param" : vars.get("$param.MSTTeamId_param"), "ObjectRowId_param" : vars.get("$param.AssignmentRowId_param"), "AssignmentName_param" : vars.get("$param.AssignmentName_param"), "AssignmentTable_param" : vars.get("$param.AssignmentTable_param") }); - - diff --git a/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/stateProcess.js b/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/stateProcess.js index 38e484f314e87e62e062a2731ccaf146af8af8c7..0bd4c4c544c99f66a5a2ce914d8abd13910ad5c5 100644 --- a/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/stateProcess.js +++ b/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/stateProcess.js @@ -1,11 +1,7 @@ +import("MSTeams_lib"); import("system.vars"); import("system.neon"); import("system.result"); -import("Sql_lib"); -var isArchived = newSelect("IS_ARCHIVED", "Data_alias") - .from("MST_TEAM") - .where("MST_TEAM.MST_TEAMID", "$param.MSTTeamId_param") - .cell() == "1"; - -result.string(isArchived ? neon.COMPONENTSTATE_DISABLED : neon.COMPONENTSTATE_EDITABLE); \ No newline at end of file +var isEnabled = MSTeamsUtils.isTeamsEnabled() && MSTeamsUtils.isTeamActive(vars.get("$param.MSTTeamId_param")); +result.string(isEnabled ? neon.COMPONENTSTATE_EDITABLE : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Favorite_entity/recordcontainers/jditorecordcontainer/contentProcess.js b/entity/Favorite_entity/recordcontainers/jditorecordcontainer/contentProcess.js index 3bf9fefa02cb04a9da8583c410e0f8c4782fc974..eafabfcf64d2ef9eaea73303673e6b186e7ab184 100644 --- a/entity/Favorite_entity/recordcontainers/jditorecordcontainer/contentProcess.js +++ b/entity/Favorite_entity/recordcontainers/jditorecordcontainer/contentProcess.js @@ -127,10 +127,17 @@ function buildFavorites(favos, objecttype) loadConfig.uids(ids); loadConfig.count(200); loadConfig.fields(["#CONTENTTITLE", "#IMAGE", "#UID"]); - var loadedRows = entities.getRows(loadConfig); - for(z = 0; z < loadedRows.length; z++) - getFavoriteWith(loadedRows[z], builtFavos, favos, loadedRows[z]["#UID"], objecttype); + try { + var loadedRows = entities.getRows(loadConfig); + + for(z = 0; z < loadedRows.length; z++) + getFavoriteWith(loadedRows[z], builtFavos, favos, loadedRows[z]["#UID"], objecttype); + + } catch(e) + { + //maybe a missing permission for entity + } return builtFavos; } diff --git a/entity/Forecast_entity/Forecast_entity.aod b/entity/Forecast_entity/Forecast_entity.aod index f553dde8f46895a3f1a215e1bcf33825610c8009..75fd4c7ae9258a52deeef0b48abc4dc96905bda3 100644 --- a/entity/Forecast_entity/Forecast_entity.aod +++ b/entity/Forecast_entity/Forecast_entity.aod @@ -171,10 +171,6 @@ <name>OBJECT_ROWID.value</name> <recordfield>FORECAST.OBJECT_ROWID</recordfield> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>OBJECT_ROWID.displayValue</name> - <expression>%aditoprj%/entity/Forecast_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js</expression> - </dbRecordFieldMapping> <dbRecordFieldMapping> <name>OBJECT_TYPE.value</name> <recordfield>FORECAST.OBJECT_TYPE</recordfield> diff --git a/entity/Forecast_entity/entityfields/object_rowid/displayValueProcess.js b/entity/Forecast_entity/entityfields/object_rowid/displayValueProcess.js index 8b080bceea92c146a676b0f33cc7cb87d4e86b9d..95c4eea5367140dc2d81e470ba0607adf52f07c1 100644 --- a/entity/Forecast_entity/entityfields/object_rowid/displayValueProcess.js +++ b/entity/Forecast_entity/entityfields/object_rowid/displayValueProcess.js @@ -7,5 +7,5 @@ import("Context_lib"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$field.OBJECT_ROWID")) { result.string(""); } else if (vars.exists("$field.OBJECT_TYPE") && vars.get("$field.OBJECT_TYPE")) { - result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID")))); + result.string(ContextUtils.getTitleByContext(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID"))); } \ No newline at end of file diff --git a/entity/Forecast_entity/recordcontainers/db/conditionProcess.js b/entity/Forecast_entity/recordcontainers/db/conditionProcess.js index a4ec94640015904a7560453161e2cab3a49c2320..0c0805ca63787abe761e25b34fa860f9cb5c820d 100644 --- a/entity/Forecast_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Forecast_entity/recordcontainers/db/conditionProcess.js @@ -7,5 +7,4 @@ var cond = newWhere() .andIfSet("FORECAST.OBJECT_ROWID", "$param.ObjectRowId_param") .andIfSet("FORECAST.OBJECT_TYPE", "$param.ObjectType_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Forecast_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js b/entity/Forecast_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js deleted file mode 100644 index 856c1bb3cfff78abcc06bc817a49a40757e3529f..0000000000000000000000000000000000000000 --- a/entity/Forecast_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.result"); -import("Context_lib"); - -result.string(ContextUtils.getNameSubselectSql("FORECAST.OBJECT_TYPE", "FORECAST.OBJECT_ROWID")) \ No newline at end of file diff --git a/entity/KeywordAttributeRelation_entity/recordcontainers/db/conditionProcess.js b/entity/KeywordAttributeRelation_entity/recordcontainers/db/conditionProcess.js index 88a371d623036551c0e883501e7ce2fbb7467852..08a73e065351292b94799258ed901ef6689197e1 100644 --- a/entity/KeywordAttributeRelation_entity/recordcontainers/db/conditionProcess.js +++ b/entity/KeywordAttributeRelation_entity/recordcontainers/db/conditionProcess.js @@ -6,5 +6,4 @@ import("Sql_lib"); var cond = newWhereIfSet("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ENTRY_ID", "$param.KeywordEntryId_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/KeywordAttribute_entity/recordcontainers/db/conditionProcess.js b/entity/KeywordAttribute_entity/recordcontainers/db/conditionProcess.js index 823c3d4a9247760a8f02f2a715291b64e32315b4..15f1ee62a401226343c96a26c3a7b084e07a843b 100644 --- a/entity/KeywordAttribute_entity/recordcontainers/db/conditionProcess.js +++ b/entity/KeywordAttribute_entity/recordcontainers/db/conditionProcess.js @@ -16,5 +16,4 @@ if (entryIdForFilter) SqlBuilder.NOT_IN()) } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/KeywordEntry_entity/KeywordEntry_entity.aod b/entity/KeywordEntry_entity/KeywordEntry_entity.aod index ad9c6c66275b74b098addef8c4d4ed2ca621cb5c..198706a9c3b7b8e46ad4077fb5705ef12c5ce44e 100644 --- a/entity/KeywordEntry_entity/KeywordEntry_entity.aod +++ b/entity/KeywordEntry_entity/KeywordEntry_entity.aod @@ -589,6 +589,12 @@ <fieldName>KeywordVisitRecommendationSource</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>10ced13f-78ae-4e99-a315-82f1f7389029</name> + <entityName>CampaignStep_entity</entityName> + <fieldName>KeywordStepMedium</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> diff --git a/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js b/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js index 6fcb81de353b15da6987c4a057a54535f2d1fcbb..c2921e933fff759455fdd5adefee3f8731fe79d3 100644 --- a/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js +++ b/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js @@ -23,5 +23,4 @@ if (vars.getString("$param.WhitelistIds_param")) cond.noResult(); // force empty result if whitelist is empty } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); diff --git a/entity/KnowledgeDiscussion_entity/KnowledgeDiscussion_entity.aod b/entity/KnowledgeDiscussion_entity/KnowledgeDiscussion_entity.aod index a5465f6d0a9fc19452bbd8ae4cae975e8c022634..0b70f5dfc1e35d98e753252c683061c4e542b143 100644 --- a/entity/KnowledgeDiscussion_entity/KnowledgeDiscussion_entity.aod +++ b/entity/KnowledgeDiscussion_entity/KnowledgeDiscussion_entity.aod @@ -94,7 +94,7 @@ </entityParameter> <entityActionGroup> <name>Edit_ActionGroup</name> - <title>Bearbeiten</title> + <title>Edit</title> <children> <entityActionField> <name>addAnswer_action</name> diff --git a/entity/KnowledgeManagementTags_entity/KnowledgeManagementTags_entity.aod b/entity/KnowledgeManagementTags_entity/KnowledgeManagementTags_entity.aod index 552ce5d4c60ec37bc0accaf3ae5b4f1dc9f4d98e..10b75658ad1ebbc11fb08b9e00198ea8b0e1fe83 100644 --- a/entity/KnowledgeManagementTags_entity/KnowledgeManagementTags_entity.aod +++ b/entity/KnowledgeManagementTags_entity/KnowledgeManagementTags_entity.aod @@ -47,18 +47,6 @@ <fieldName>CompleteList</fieldName> </dependency> </entityConsumer> - <entityActionField> - <name>ActionField1</name> - <title>a1</title> - </entityActionField> - <entityActionField> - <name>ActionField2</name> - <title>a2</title> - </entityActionField> - <entityActionField> - <name>ActionField3</name> - <title>a3</title> - </entityActionField> <entityProvider> <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> diff --git a/entity/KnowledgeManagement_entity/KnowledgeManagement_entity.aod b/entity/KnowledgeManagement_entity/KnowledgeManagement_entity.aod index c65093499e823c8705bef2c4130ee6ffcb08cc3a..f52fc433f41faf4abc036c2483ff961baad4ff31 100644 --- a/entity/KnowledgeManagement_entity/KnowledgeManagement_entity.aod +++ b/entity/KnowledgeManagement_entity/KnowledgeManagement_entity.aod @@ -20,7 +20,6 @@ <entityDependency> <name>40cf66ca-421f-47f6-8ecc-8360657e0640</name> <entityName>KnowledgeNewsFeed_entity</entityName> - <fieldName>Consumer</fieldName> <isConsumer v="false" /> </entityDependency> </dependencies> diff --git a/entity/KnowledgeNewsFeed_entity/entityfields/consumer/children/isdashlet_param/valueProcess.js b/entity/KnowledgeNewsFeed_entity/entityfields/consumer/children/isdashlet_param/valueProcess.js deleted file mode 100644 index 40effa0178464da0c7850912345f19c7fa95975a..0000000000000000000000000000000000000000 --- a/entity/KnowledgeNewsFeed_entity/entityfields/consumer/children/isdashlet_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/Language_entity/recordcontainers/db/conditionProcess.js b/entity/Language_entity/recordcontainers/db/conditionProcess.js index 9e0e3a69ce20255f94f5f90179b9dbc93ac2c006..f36ae3e0f8d6f0cd9d8ae5df3c1dbce72112dfad 100644 --- a/entity/Language_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Language_entity/recordcontainers/db/conditionProcess.js @@ -10,5 +10,4 @@ if (vars.getString("$param.ExcludedIds_param")) cond.andIfSet("AB_LANGUAGE.ISO3", JSON.parse(vars.getString("$param.ExcludedIds_param")), SqlBuilder.NOT_IN()) } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()) \ No newline at end of file diff --git a/entity/Leadimport_entity/Leadimport_entity.aod b/entity/Leadimport_entity/Leadimport_entity.aod index e5241d647c840387bb8afa77a68ae3282a8532b1..e14d1cf8eba7469610518dc02aab6709166a5fa4 100644 --- a/entity/Leadimport_entity/Leadimport_entity.aod +++ b/entity/Leadimport_entity/Leadimport_entity.aod @@ -10,6 +10,7 @@ <grantDelete v="true" /> <grantDeleteProcess>%aditoprj%/entity/Leadimport_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/Leadimport_entity/contentTitleProcess.js</contentTitleProcess> + <contentDescriptionProcess>%aditoprj%/entity/Leadimport_entity/contentDescriptionProcess.js</contentDescriptionProcess> <iconId>NEON:IMPORT</iconId> <imageProcess>%aditoprj%/entity/Leadimport_entity/imageProcess.js</imageProcess> <titlePlural>Lead Imports</titlePlural> @@ -17,6 +18,14 @@ <entityFields> <entityProvider> <name>#PROVIDER</name> + <dependencies> + <entityDependency> + <name>451f0237-27f9-4018-a165-9bb4857d6565</name> + <entityName>Object_entity</entityName> + <fieldName>Leadimports</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityField> <name>NAME</name> diff --git a/entity/Leadimport_entity/contentDescriptionProcess.js b/entity/Leadimport_entity/contentDescriptionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..5fa0cb58bc2af5ffc2520ddbfde0595a93c67cb9 --- /dev/null +++ b/entity/Leadimport_entity/contentDescriptionProcess.js @@ -0,0 +1,5 @@ +import("system.datetime"); +import("system.vars"); +import("system.result"); +import("system.translate"); +result.string(datetime.toDate(vars.get("$field.DATE_NEW"), translate.text("dd.MM.yyyy"))); \ No newline at end of file diff --git a/entity/LogHistory_entity/LogHistory_entity.aod b/entity/LogHistory_entity/LogHistory_entity.aod index 6499fc00e002942363effcb7f67696ae5849e409..b7abfc4219a2b8478201416b55233d42b5207737 100644 --- a/entity/LogHistory_entity/LogHistory_entity.aod +++ b/entity/LogHistory_entity/LogHistory_entity.aod @@ -39,6 +39,12 @@ <entityProvider> <name>LogHistoryProvider</name> <documentation>%aditoprj%/entity/LogHistory_entity/entityfields/loghistoryprovider/documentation.adoc</documentation> + <children> + <entityParameter> + <name>tablenames_param</name> + <documentation>%aditoprj%/entity/LogHistory_entity/entityfields/loghistoryprovider/children/tablenames_param/documentation.adoc</documentation> + </entityParameter> + </children> <dependencies> <entityDependency> <name>23dbfa51-5340-48e3-bd60-e0dcb7d44ad3</name> diff --git a/entity/LogHistory_entity/documentation.adoc b/entity/LogHistory_entity/documentation.adoc index 20fa16faa475bdb8b0cd35d7ddb11fe847f73e0e..b38670d44b72f1f2236c7f594c3f1935458061a3 100644 --- a/entity/LogHistory_entity/documentation.adoc +++ b/entity/LogHistory_entity/documentation.adoc @@ -2,5 +2,92 @@ Entity for the log entries in the individual modules. -This entity is based on the `AB_LOGHISTORY`-table. Note that this database table has no primary key associated to it. -This is because it is only a pit of log-record and not necessary. \ No newline at end of file +This entity is based on the `AB_LOGHISTORY`-table. + +== configure Loghistory + +:DATA_ALIAS: Data_alias +:EDITOR_ALIAS_DEFINITION: AliasDefinition-Editor + +=== the concept +//TODO: extend the concept description +Stoarge: Database-table: `AB_LOGHISTORY` + +Collecting Data: +---- +Audit -> process_audit -> Loghistory_lib: LogHistoryExecutor +---- + +Data is collected and pre-translated. Therefor only one Language can be applied for logging. +Because the loghistory is written via the auditing, only changes that are done with the proper Jdito-Methods will be logged. + +=== prerequisites + +Auditing has to be activated for all tables you want to log. + +.prerequisites of enabling Audit in general +* Auditing has to be enabled in your Server +* Auditing has to be enabled for your alias (default: +{DATA_ALIAS}+) +* Tables that shall be logged need some configs in the _{EDITOR_ALIAS_DEFINITION}_ +** property `idColumn` has to be set (a primary key is needed therefore) +** `auditMode` has to be set -Standard, -CLOB, or -BLOB (chosse the one you really need) + + +=== activate writing into loghistory + +Assuming that the + +* required database-tables exist +* JDito-processes already exist +* audit has been activated in general + +you are ready to configure _which_ column shall be logged and _how_. + +==== configure columns for logging + +There are several properties (custom and pre-exisiting) that can be set for configuring the logging: + +.configuration options per column +[options="header"] +|======= +|property |purpose |property-type +|+title+ |text that is used to display which column has been modified|pre-exisiting +|+log+ |defines whether a column needs to be logged or not; not exisisting equals `false` |custom: Booelan +|+tableRef+ |references table for automatically grouping data. This is usefull for ForeignKeys, e.g. a +OFFERITEM.OFFER_ID+ column could have a +tableRef+ "OFFER"|custom: String +|+primaryKey+ |this is not only used to enable auditing generally, but it's used to resolve +tableRef+ values correctly|pre-exisiting +|+keyword+ |defines a keyword contianer that should be used to transform a +KEYID+ into a display value|custom: String +|+autoMapTrueFalse4Log+ |if `true` the loghistory-executor tries to automatically translate a value into a "yes"/"no"-display value|custom: Booelan +|+translate4Log+ |defines a process to transform a technical value into a display value |custom: JDito +|======= + ++translate4Log+ is a mighty possibility to translate a ID-value into a displayvalue. However, you should keep several important things in mind: + +* translate text if necessary via the locale-parameter +* the process is called each time a change to that column is applied - keep it fast and simple + +.translate4Log example (skip imports for better readability) +[source,javascript] +---- +var params = Translate4LogParams.load();// <1> +var countryName = CountryUtils.getLatinNameByIso2(params.value, params.locale); // <2> +result.string(countryName);// <3> +---- +<1> load the parameters in a easy and fail-proof way +<2> locale is passed to the resolving function and in that function a translation is applied +<3> always return a string + +==== configure a consumer for retrieving the loghistory + +.Example for the +tablenames_param+ process +---- +import("system.vars"); +import("system.result"); +import("Context_lib"); + +var res = []; +res.push({id: vars.get("$field.CONTACTID"), tableNames: ["CONTACT", "COMMUNICATION", "ADDRESS", "AB_ATTRIBUTERELATION"]}); +res.push({id: vars.get("$field.PERSONID"), tableNames: ["PERSON"]}); + +res = JSON.stringify(res); +result.object(res); +---- \ No newline at end of file diff --git a/entity/LogHistory_entity/entityfields/loghistoryprovider/children/tablenames_param/documentation.adoc b/entity/LogHistory_entity/entityfields/loghistoryprovider/children/tablenames_param/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..3051d2df3f9362543da5347d37f36446eb4a924f --- /dev/null +++ b/entity/LogHistory_entity/entityfields/loghistoryprovider/children/tablenames_param/documentation.adoc @@ -0,0 +1,15 @@ += tablenames_param + +.Example +---- +import("system.vars"); +import("system.result"); +import("Context_lib"); + +var res = []; +res.push({id: vars.get("$field.CONTACTID"), tableNames: ["CONTACT", "COMMUNICATION", "ADDRESS", "AB_ATTRIBUTERELATION"]}); +res.push({id: vars.get("$field.PERSONID"), tableNames: ["PERSON"]}); + +res = JSON.stringify(res); +result.object(res); +---- \ No newline at end of file diff --git a/entity/LogHistory_entity/entityfields/loghistoryprovider/documentation.adoc b/entity/LogHistory_entity/entityfields/loghistoryprovider/documentation.adoc index 2712d5d5c6d4ad5349fc4f6539190503d2efa92d..4088dd1c6fa530aa4a30a142f1eb47d5ce7a7c1e 100644 --- a/entity/LogHistory_entity/entityfields/loghistoryprovider/documentation.adoc +++ b/entity/LogHistory_entity/entityfields/loghistoryprovider/documentation.adoc @@ -1,3 +1,5 @@ += LogHistoryProvider + Generic provider for log history entries. A filter for given _tablenames_ is applied, see the documentation of the parameters for an example. \ No newline at end of file diff --git a/entity/MSTTeamLink_entity/MSTTeamLink_entity.aod b/entity/MSTTeamLink_entity/MSTTeamLink_entity.aod index eec88fc693dd63a69b267a436a2beb44654990b7..d2df3a1cd3f9fc1b4d60743b0143d100153d3191 100644 --- a/entity/MSTTeamLink_entity/MSTTeamLink_entity.aod +++ b/entity/MSTTeamLink_entity/MSTTeamLink_entity.aod @@ -2,6 +2,7 @@ <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> <name>MSTTeamLink_entity</name> <majorModelMode>DISTRIBUTED</majorModelMode> + <documentation>%aditoprj%/entity/MSTTeamLink_entity/documentation.adoc</documentation> <siblings> <element>Salesproject_entity</element> <element>Member_entity</element> diff --git a/entity/MSTTeamLink_entity/documentation.adoc b/entity/MSTTeamLink_entity/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..55fcd72aba98ec0011c6562a4a81014327899e72 --- /dev/null +++ b/entity/MSTTeamLink_entity/documentation.adoc @@ -0,0 +1,3 @@ += MSTTeamLink_entity + +This entity represents a relation between a MST team and an object (e. g. a Sales Project). \ No newline at end of file diff --git a/entity/MSTTeamMember_entity/MSTTeamMember_entity.aod b/entity/MSTTeamMember_entity/MSTTeamMember_entity.aod index ec5ee48818d6c519ed35b7dca32f0df2a88756b4..72dead10e1dc47cf5fe80fb31d4493667fd40677 100644 --- a/entity/MSTTeamMember_entity/MSTTeamMember_entity.aod +++ b/entity/MSTTeamMember_entity/MSTTeamMember_entity.aod @@ -13,8 +13,6 @@ <dependencies> <entityDependency> <name>335d30c4-7beb-4dcb-8a0f-de85108530a9</name> - <entityName>MSTeamsAddMembers_entity</entityName> - <fieldName>Members</fieldName> <isConsumer v="false" /> </entityDependency> </dependencies> @@ -59,6 +57,7 @@ </entityConsumer> <entityField> <name>ISEXTERN</name> + <state>INVISIBLE</state> <valueProcess>%aditoprj%/entity/MSTTeamMember_entity/entityfields/isextern/valueProcess.js</valueProcess> </entityField> <entityField> @@ -109,12 +108,18 @@ </entityProvider> <entityField> <name>AZUREID</name> + <state>INVISIBLE</state> <valueProcess>%aditoprj%/entity/MSTTeamMember_entity/entityfields/azureid/valueProcess.js</valueProcess> </entityField> <entityField> <name>AZUREUPN</name> + <state>INVISIBLE</state> <valueProcess>%aditoprj%/entity/MSTTeamMember_entity/entityfields/azureupn/valueProcess.js</valueProcess> </entityField> + <entityField> + <name>AZURE_DATA</name> + <valueProcess>%aditoprj%/entity/MSTTeamMember_entity/entityfields/azure_data/valueProcess.js</valueProcess> + </entityField> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/MSTTeamMember_entity/entityfields/azure_data/valueProcess.js b/entity/MSTTeamMember_entity/entityfields/azure_data/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..2df756b62a28fb058c3cec8a2df5de3090bf9538 --- /dev/null +++ b/entity/MSTTeamMember_entity/entityfields/azure_data/valueProcess.js @@ -0,0 +1,16 @@ +import("system.result"); +import("system.neon"); +import("system.tools"); +import("system.vars"); +import("Employee_lib"); + +var contactId = vars.get("$field.CONTACT_ID"); +var user = EmployeeUtils.getUserByContactId(contactId); +var azureId = user ? user[tools.PARAMS][tools.TEAMS_AZUREID] : ""; +var azureUpn = user ? user[tools.PARAMS][tools.TEAMS_AZUREUPN] : ""; + +var azureData = { + azureId: azureId, + azureUpn: azureUpn +}; +result.string(JSON.stringify(azureData)); \ No newline at end of file diff --git a/entity/MSTTeamMember_entity/entityfields/azureid/valueProcess.js b/entity/MSTTeamMember_entity/entityfields/azureid/valueProcess.js index a2578b0245c60ca76e9ffdfe7b517ec2a3b43639..7744184c730b891e88e88ada811a017db109b03d 100644 --- a/entity/MSTTeamMember_entity/entityfields/azureid/valueProcess.js +++ b/entity/MSTTeamMember_entity/entityfields/azureid/valueProcess.js @@ -1 +1,6 @@ -//The value is set by ISEXTERN.valueProcess \ No newline at end of file +import("system.result"); +import("Util_lib"); +import("system.vars"); + +var azureData = Utils.parseJSON(vars.get("$field.AZURE_DATA")); +result.string(azureData ? azureData.azureId : ""); \ No newline at end of file diff --git a/entity/MSTTeamMember_entity/entityfields/azureupn/valueProcess.js b/entity/MSTTeamMember_entity/entityfields/azureupn/valueProcess.js index a2578b0245c60ca76e9ffdfe7b517ec2a3b43639..554d4e727325955acb211567d4ea1878a534128c 100644 --- a/entity/MSTTeamMember_entity/entityfields/azureupn/valueProcess.js +++ b/entity/MSTTeamMember_entity/entityfields/azureupn/valueProcess.js @@ -1 +1,6 @@ -//The value is set by ISEXTERN.valueProcess \ No newline at end of file +import("system.result"); +import("Util_lib"); +import("system.vars"); + +var azureData = Utils.parseJSON(vars.get("$field.AZURE_DATA")); +result.string(azureData ? azureData.azureUpn : ""); \ No newline at end of file diff --git a/entity/MSTTeamMember_entity/entityfields/isextern/valueProcess.js b/entity/MSTTeamMember_entity/entityfields/isextern/valueProcess.js index 79c7037eb740aafb956016293c8ac55575d15be9..c2bd7034a52ed887060a47de48959ab0db7792f5 100644 --- a/entity/MSTTeamMember_entity/entityfields/isextern/valueProcess.js +++ b/entity/MSTTeamMember_entity/entityfields/isextern/valueProcess.js @@ -1,14 +1,6 @@ import("system.result"); -import("system.neon"); -import("system.tools"); +import("Util_lib"); import("system.vars"); -import("Employee_lib"); -var contactId = vars.get("$field.CONTACT_ID"); -var user = EmployeeUtils.getUserByContactId(contactId); -var azureId = user ? user[tools.PARAMS][tools.TEAMS_AZUREID] : ""; -var azureUpn = user ? user[tools.PARAMS][tools.TEAMS_AZUREUPN] : ""; - -neon.setFieldValue("$field.AZUREUPN", azureUpn); -neon.setFieldValue("$field.AZUREID", azureId); -result.string(!azureId && !azureUpn); \ No newline at end of file +var azureData = Utils.parseJSON(vars.get("$field.AZURE_DATA")); +result.string(!azureData || !(azureData.azureId || azureData.azureUpn)); \ No newline at end of file diff --git a/entity/MSTTeam_entity/MSTTeam_entity.aod b/entity/MSTTeam_entity/MSTTeam_entity.aod index d062fa0ba0159461cf14f6927eafc6ac0578c28c..f7675657fed04c925d381d928cb6d43ce6d14d20 100644 --- a/entity/MSTTeam_entity/MSTTeam_entity.aod +++ b/entity/MSTTeam_entity/MSTTeam_entity.aod @@ -26,6 +26,7 @@ <name>DESCRIPTION</name> <title>Description</title> <contentType>LONG_TEXT</contentType> + <stateProcess>%aditoprj%/entity/MSTTeam_entity/entityfields/description/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/MSTTeam_entity/entityfields/description/valueProcess.js</valueProcess> </entityField> <entityParameter> diff --git a/entity/MSTTeam_entity/recordcontainers/jdito/onInsert.js b/entity/MSTTeam_entity/recordcontainers/jdito/onInsert.js index 3a4b2c76861ec479147993623ae2d38821a56f94..8a1c6e0c83d6d16ef62ed23cb2594be121eb5a0f 100644 --- a/entity/MSTTeam_entity/recordcontainers/jdito/onInsert.js +++ b/entity/MSTTeam_entity/recordcontainers/jdito/onInsert.js @@ -20,9 +20,6 @@ teamMembers.forEach(function (teamMember) var contactId = teamMember["CONTACT_ID"]; var isExtern = Utils.toBoolean(teamMember["ISEXTERN"]); var isInvite = Utils.toBoolean(teamMember["INVITE"]); - var isOwner = teamMember["ROLE"] == "owner"; - var memberAzureId = teamMember["AZUREID"]; - var memberUpn = teamMember["AZUREUPN"]; if (isExtern) { var memberEmail = CommUtil.getStandardMail(contactId); @@ -35,6 +32,9 @@ teamMembers.forEach(function (teamMember) } return; } + var memberAzureId = teamMember["AZUREID"]; + var memberUpn = teamMember["AZUREUPN"]; + var isOwner = teamMember["ROLE"] == "owner"; if (!memberAzureId && memberUpn) memberAzureId = teams.getInternalAzureId(memberUpn); if (memberAzureId) diff --git a/entity/MSTeamsActivityImport_entity/MSTeamsActivityImport_entity.aod b/entity/MSTeamsActivityImport_entity/MSTeamsActivityImport_entity.aod index fb158db38dab460656f51b425e543dad8fa8f3ed..2f279cf23fb22d886b2a3a7bce9c60edcf83206c 100644 --- a/entity/MSTeamsActivityImport_entity/MSTeamsActivityImport_entity.aod +++ b/entity/MSTeamsActivityImport_entity/MSTeamsActivityImport_entity.aod @@ -80,7 +80,6 @@ </entityProvider> <entityActionField> <name>importMessages</name> - <onActionProcess>%aditoprj%/entity/MSTeamsActivityImport_entity/entityfields/importmessages/onActionProcess.js</onActionProcess> </entityActionField> </entityFields> <recordContainers> diff --git a/entity/MSTeamsActivityImport_entity/entityfields/importmessages/onActionProcess.js b/entity/MSTeamsActivityImport_entity/entityfields/importmessages/onActionProcess.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/entity/MSTeamsAddMembers_entity/MSTeamsAddMembers_entity.aod b/entity/MSTeamsAddMembers_entity/MSTeamsAddMembers_entity.aod deleted file mode 100644 index b3a788b7b01d1fc0034463680723dc9fa96bcb6a..0000000000000000000000000000000000000000 --- a/entity/MSTeamsAddMembers_entity/MSTeamsAddMembers_entity.aod +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> - <name>MSTeamsAddMembers_entity</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <documentation>%aditoprj%/entity/MSTeamsAddMembers_entity/documentation.adoc</documentation> - <title>Add members</title> - <siblings /> - <recordContainer>jdito</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - </entityProvider> - <entityField> - <name>UID</name> - </entityField> - <entityConsumer> - <name>Members</name> - <dependency> - <name>dependency</name> - <entityName>MSTTeamMember_entity</entityName> - <fieldName>#PROVIDER</fieldName> - </dependency> - <children> - <entityParameter> - <name>ObjectRowId_param</name> - <valueProcess>%aditoprj%/entity/MSTeamsAddMembers_entity/entityfields/members/children/objectrowid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <valueProcess>%aditoprj%/entity/MSTeamsAddMembers_entity/entityfields/members/children/objecttype_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>MST_TEAMNAME</name> - <title>Team name</title> - <valueProcess>%aditoprj%/entity/MSTeamsAddMembers_entity/entityfields/mst_teamname/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>MST_TEAM_ID</name> - <valueProcess>%aditoprj%/entity/MSTeamsAddMembers_entity/entityfields/mst_team_id/valueProcess.js</valueProcess> - </entityField> - <entityParameter> - <name>ObjectRowId_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <expose v="true" /> - </entityParameter> - <entityProvider> - <name>#PROVIDER_AGGREGATES</name> - <useAggregates v="true" /> - </entityProvider> - </entityFields> - <recordContainers> - <jDitoRecordContainer> - <name>jdito</name> - <jDitoRecordAlias>Data_alias</jDitoRecordAlias> - <contentProcess>%aditoprj%/entity/MSTeamsAddMembers_entity/recordcontainers/jdito/contentProcess.js</contentProcess> - <onInsert>%aditoprj%/entity/MSTeamsAddMembers_entity/recordcontainers/jdito/onInsert.js</onInsert> - <recordFieldMappings> - <jDitoRecordFieldMapping> - <name>UID.value</name> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>MST_TEAM_ID.value</name> - </jDitoRecordFieldMapping> - </recordFieldMappings> - </jDitoRecordContainer> - </recordContainers> -</entity> diff --git a/entity/MSTeamsAddMembers_entity/documentation.adoc b/entity/MSTeamsAddMembers_entity/documentation.adoc deleted file mode 100644 index 228acd4d94057e2d72496ce933e8e8e39307b1e9..0000000000000000000000000000000000000000 --- a/entity/MSTeamsAddMembers_entity/documentation.adoc +++ /dev/null @@ -1,14 +0,0 @@ -MSTeamsAddMembers -============ - -== Overview == -MSTeamsAddMembers is used to add Members - -== A MSTeamsAddMembers consists of some modules: == -- MSTeamsAddMembers itself - -== BestPractice == - -== FAQ == - - diff --git a/entity/MSTeamsAddMembers_entity/entityfields/members/children/objectrowid_param/valueProcess.js b/entity/MSTeamsAddMembers_entity/entityfields/members/children/objectrowid_param/valueProcess.js deleted file mode 100644 index dc0d70ccbe710b96a2f13dfac668a5b705e5aae1..0000000000000000000000000000000000000000 --- a/entity/MSTeamsAddMembers_entity/entityfields/members/children/objectrowid_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.vars"); -import("system.result"); - -result.string(vars.get("$param.ObjectRowId_param")); \ No newline at end of file diff --git a/entity/MSTeamsAddMembers_entity/entityfields/members/children/objecttype_param/valueProcess.js b/entity/MSTeamsAddMembers_entity/entityfields/members/children/objecttype_param/valueProcess.js deleted file mode 100644 index 95c8514f3bbc2804547c47b50ec222c09aec3f59..0000000000000000000000000000000000000000 --- a/entity/MSTeamsAddMembers_entity/entityfields/members/children/objecttype_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.vars"); -import("system.result"); - -result.string(vars.get("$param.ObjectType_param")); \ No newline at end of file diff --git a/entity/MSTeamsAddMembers_entity/entityfields/mst_team_id/valueProcess.js b/entity/MSTeamsAddMembers_entity/entityfields/mst_team_id/valueProcess.js deleted file mode 100644 index 3db681dd8d27bb7fc620e24ca185ba0f49d2c433..0000000000000000000000000000000000000000 --- a/entity/MSTeamsAddMembers_entity/entityfields/mst_team_id/valueProcess.js +++ /dev/null @@ -1,7 +0,0 @@ -import("system.result"); -import("Sql_lib"); - -result.string(newSelect("MST_TEAM_ID") - .from("SALESPROJECT") - .where("SALESPROJECT.SALESPROJECTID", "$param.SalesprojectId_param") - .cell()); \ No newline at end of file diff --git a/entity/MSTeamsAddMembers_entity/entityfields/mst_teamname/valueProcess.js b/entity/MSTeamsAddMembers_entity/entityfields/mst_teamname/valueProcess.js deleted file mode 100644 index 7945448b1d24478fe0527d9775dc2496f1c78bb1..0000000000000000000000000000000000000000 --- a/entity/MSTeamsAddMembers_entity/entityfields/mst_teamname/valueProcess.js +++ /dev/null @@ -1,7 +0,0 @@ -import("system.result"); -import("Sql_lib"); - -result.string(newSelect("TEAMNAME") - .from("MST_TEAM") - .where("MST_TEAM.MST_TEAMID", "$field.MST_TEAM_ID") - .cell()); \ No newline at end of file diff --git a/entity/MSTeamsAddMembers_entity/recordcontainers/jdito/contentProcess.js b/entity/MSTeamsAddMembers_entity/recordcontainers/jdito/contentProcess.js deleted file mode 100644 index af9ece7caa7f3a45a9d57f2700b96a4c9a5fa1ea..0000000000000000000000000000000000000000 --- a/entity/MSTeamsAddMembers_entity/recordcontainers/jdito/contentProcess.js +++ /dev/null @@ -1,9 +0,0 @@ -import("system.result"); -import("system.vars"); - -//TODO: This dummy implementation shouldn't be nescessary here. Remove this process eventually. #1051003 -var rows = []; -if (vars.get("$local.idvalues")) - rows = vars.get("$local.idvalues").map(function (id) {return [id, ""];}); - -result.object(rows); \ No newline at end of file diff --git a/entity/MSTeamsAddMembers_entity/recordcontainers/jdito/onInsert.js b/entity/MSTeamsAddMembers_entity/recordcontainers/jdito/onInsert.js deleted file mode 100644 index 584fbcf9708b5ae3c1365231acff5520e7da59f0..0000000000000000000000000000000000000000 --- a/entity/MSTeamsAddMembers_entity/recordcontainers/jdito/onInsert.js +++ /dev/null @@ -1,43 +0,0 @@ -import("Communication_lib"); -import("Sql_lib"); -import("system.vars"); -import("system.teams"); -import("system.tools"); -import("Employee_lib"); - -var rowdata = vars.get("$local.rowdata"); -var teamId = rowdata["MST_TEAM_ID.value"]; -var teamMembers = vars.get("$field.Members.insertedRows"); - -var internalMembers = []; -var externalMembers = []; -teamMembers.forEach(function (teamMember) -{ - var memberUser = EmployeeUtils.getUserByContactId(teamMember.MEMBER); - if (!memberUser) - { - var memberEmail = CommUtil.getStandardMail(teamMember.MEMBER); - if (memberEmail) - { - externalMembers.push( - teams.createExternalUserConfig(memberEmail) - .sendInvitation(teamMember.ROLE_OR_INVITE == "invite") - ); - } - return; - } - var memberAzureId = memberUser[tools.PARAMS][tools.TEAMS_AZUREID]; - var memberUpn = memberUser[tools.PARAMS][tools.TEAMS_AZUREUPN]; - if (!memberAzureId && memberUpn) - memberAzureId = teams.getInternalAzureId(memberUpn); - if (memberAzureId) - { - internalMembers.push(teams.createInternalUserConfig(memberAzureId).setOwner(teamMember.ROLE_OR_INVITE == "isOwner")); - } -}); - -if (internalMembers.length !== 0) - teams.addInternalMembers(teamId, internalMembers); - -if (externalMembers.length !== 0) - teams.addExternalMembers(teamId, externalMembers); \ No newline at end of file diff --git a/entity/MSTeamsDocument_entity/MSTeamsDocument_entity.aod b/entity/MSTeamsDocument_entity/MSTeamsDocument_entity.aod index 9929c440ae7a5d952e3c19cb7a6b1001aa165e3c..7b63c5f0e10641d17d6bc056c6f771d217cc1e7d 100644 --- a/entity/MSTeamsDocument_entity/MSTeamsDocument_entity.aod +++ b/entity/MSTeamsDocument_entity/MSTeamsDocument_entity.aod @@ -4,7 +4,7 @@ <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/MSTeamsDocument_entity/documentation.adoc</documentation> <siblings /> - <recordContainer>jdito</recordContainer> + <recordContainer>dataless</recordContainer> <entityFields> <entityProvider> <name>#PROVIDER</name> @@ -14,12 +14,14 @@ <title>Documents</title> <dropDownProcess>%aditoprj%/entity/MSTeamsDocument_entity/entityfields/documents/dropDownProcess.js</dropDownProcess> <selectionMode>MULTI</selectionMode> + <state>EDITABLE</state> </entityField> <entityField> <name>CHANNEL</name> <title>Channel</title> <consumer>Channels</consumer> <mandatory v="true" /> + <state>EDITABLE</state> </entityField> <entityParameter> <name>ObjectRowId_param</name> @@ -38,17 +40,17 @@ </entityParameter> <entityConsumer> <name>Channels</name> - <dependency> - <name>dependency</name> - <entityName>MSTeamsChannel_entity</entityName> - <fieldName>ChannelsByName</fieldName> - </dependency> <children> <entityParameter> <name>TeamId_param</name> <valueProcess>%aditoprj%/entity/MSTeamsDocument_entity/entityfields/channels/children/teamid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>MSTeamsChannel_entity</entityName> + <fieldName>ChannelsByName</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>MSTTeamId_param</name> @@ -59,21 +61,15 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityActionField> + <name>importDocuments</name> + <onActionProcess>%aditoprj%/entity/MSTeamsDocument_entity/entityfields/importdocuments/onActionProcess.js</onActionProcess> + </entityActionField> </entityFields> <recordContainers> - <jDitoRecordContainer> - <name>jdito</name> - <jDitoRecordAlias>Data_alias</jDitoRecordAlias> - <contentProcess>%aditoprj%/entity/MSTeamsDocument_entity/recordcontainers/jdito/contentProcess.js</contentProcess> - <onInsert>%aditoprj%/entity/MSTeamsDocument_entity/recordcontainers/jdito/onInsert.js</onInsert> - <recordFieldMappings> - <jDitoRecordFieldMapping> - <name>UID.value</name> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>DOCUMENTS.value</name> - </jDitoRecordFieldMapping> - </recordFieldMappings> - </jDitoRecordContainer> + <datalessRecordContainer> + <name>dataless</name> + <alias>Data_alias</alias> + </datalessRecordContainer> </recordContainers> </entity> diff --git a/entity/MSTeamsDocument_entity/recordcontainers/jdito/onInsert.js b/entity/MSTeamsDocument_entity/entityfields/importdocuments/onActionProcess.js similarity index 75% rename from entity/MSTeamsDocument_entity/recordcontainers/jdito/onInsert.js rename to entity/MSTeamsDocument_entity/entityfields/importdocuments/onActionProcess.js index d97ac448ef7162f700693fe9a9089adb10971e01..7237c6c01de74d5355cde59d84173d56989b55b0 100644 --- a/entity/MSTeamsDocument_entity/recordcontainers/jdito/onInsert.js +++ b/entity/MSTeamsDocument_entity/entityfields/importdocuments/onActionProcess.js @@ -9,7 +9,7 @@ import("system.logging"); import("system.neon"); var rowData = vars.get("$local.rowdata"); -var documents = text.decodeMS(rowData["DOCUMENTS.value"]); +var documents = text.decodeMS(vars.get("$field.DOCUMENTS")); documents.forEach(function (document) { @@ -20,8 +20,8 @@ documents.forEach(function (document) var assignmentName = vars.get("$param.AssignmentName_param"); var assignmentRowId = vars.get("$param.ObjectRowId_param"); var alias = SqlUtils.getBinariesAlias(); - - var uid = db.insertBinary(assignmentTable, assignmentName, assignmentRowId, null, - file, documentName, "", "", alias, util.getNewUUID()); + + db.insertBinary(assignmentTable, assignmentName, assignmentRowId, null, + file, documentName, "", "", alias, util.getNewUUID()); }); diff --git a/entity/MSTeamsDocument_entity/recordcontainers/jdito/contentProcess.js b/entity/MSTeamsDocument_entity/recordcontainers/jdito/contentProcess.js deleted file mode 100644 index af9ece7caa7f3a45a9d57f2700b96a4c9a5fa1ea..0000000000000000000000000000000000000000 --- a/entity/MSTeamsDocument_entity/recordcontainers/jdito/contentProcess.js +++ /dev/null @@ -1,9 +0,0 @@ -import("system.result"); -import("system.vars"); - -//TODO: This dummy implementation shouldn't be nescessary here. Remove this process eventually. #1051003 -var rows = []; -if (vars.get("$local.idvalues")) - rows = vars.get("$local.idvalues").map(function (id) {return [id, ""];}); - -result.object(rows); \ No newline at end of file diff --git a/entity/MSTeamsMessage_entity/MSTeamsMessage_entity.aod b/entity/MSTeamsMessage_entity/MSTeamsMessage_entity.aod index 63a08366e652aecab4fa1e5f48067202e0d27012..437ba4f01752bc9a118f40f47ce80f9fdb5b7e3c 100644 --- a/entity/MSTeamsMessage_entity/MSTeamsMessage_entity.aod +++ b/entity/MSTeamsMessage_entity/MSTeamsMessage_entity.aod @@ -14,11 +14,11 @@ </entityField> <entityField> <name>MESSAGE</name> - <title>Nachricht</title> + <title>Message</title> </entityField> <entityField> <name>CREATED_DATE_TIME</name> - <title>Erstelldatum</title> + <title>Creation date</title> <contentType>DATE</contentType> </entityField> <entityProvider> @@ -28,8 +28,6 @@ <dependencies> <entityDependency> <name>89048e4d-32bc-4531-9b45-b0c0d9de82b1</name> - <entityName>MSTTeamChat_entity</entityName> - <fieldName>Consumer</fieldName> <isConsumer v="false" /> </entityDependency> <entityDependency> @@ -54,7 +52,6 @@ <entityParameter> <name>LoadNext_param</name> <expose v="true" /> - <documentation>%aditoprj%/entity/MSTTeamsMessage_entity/entityfields/loadnext_param/documentation.adoc</documentation> </entityParameter> <entityProvider> <name>#PROVIDER_AGGREGATES</name> @@ -66,7 +63,7 @@ <name>jdito</name> <jDitoRecordAlias>Data_alias</jDitoRecordAlias> <contentProcess>%aditoprj%/entity/MSTeamsMessage_entity/recordcontainers/jdito/contentProcess.js</contentProcess> - <title>Nachrichten</title> + <title>Messages</title> <recordFieldMappings> <jDitoRecordFieldMapping> <name>UID.value</name> diff --git a/entity/MSTeamsMessage_entity/entityfields/loadnext_param/documentation.adoc b/entity/MSTeamsMessage_entity/entityfields/loadnext_param/documentation.adoc deleted file mode 100644 index c5debf74124045763f1886e4ba64d903eeb37907..0000000000000000000000000000000000000000 --- a/entity/MSTeamsMessage_entity/entityfields/loadnext_param/documentation.adoc +++ /dev/null @@ -1,3 +0,0 @@ -= LoadNext_param - -A random UID to trigger a refresh \ No newline at end of file diff --git a/entity/Member_entity/Member_entity.aod b/entity/Member_entity/Member_entity.aod index 8706484f0ffabbeb51a9c13926942a42d5bd48b8..a416ef148b261e8877df19ee82ee0802b49753fb 100644 --- a/entity/Member_entity/Member_entity.aod +++ b/entity/Member_entity/Member_entity.aod @@ -412,10 +412,6 @@ <name>OBJECTMEMBERID.value</name> <recordfield>OBJECTMEMBER.OBJECTMEMBERID</recordfield> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>OBJECT_ROWID.displayValue</name> - <expression>%aditoprj%/entity/Member_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js</expression> - </dbRecordFieldMapping> <dbRecordFieldMapping> <name>MEMBERROLE.displayValue</name> <expression>%aditoprj%/entity/Member_entity/recordcontainers/db/recordfieldmappings/memberrole.displayvalue/expression.js</expression> diff --git a/entity/Member_entity/entityfields/msteamsactiongroup/children/addapp/onActionProcess.js b/entity/Member_entity/entityfields/msteamsactiongroup/children/addapp/onActionProcess.js index 826e42316f9b497e1a22f38b25f0bfcc420d7aba..f53cd7c87d173497b7b8fd5bcbb4ba4212bac637 100644 --- a/entity/Member_entity/entityfields/msteamsactiongroup/children/addapp/onActionProcess.js +++ b/entity/Member_entity/entityfields/msteamsactiongroup/children/addapp/onActionProcess.js @@ -3,5 +3,5 @@ import("system.project"); import("system.vars"); var appId = project.getInstanceConfigValue("teamsAppId", null); -if (appId != null) +if (appId) teams.addApp(vars.get("$param.MSTTeamId_param"), appId); \ No newline at end of file diff --git a/entity/Member_entity/entityfields/msteamsactiongroup/children/addapp/stateProcess.js b/entity/Member_entity/entityfields/msteamsactiongroup/children/addapp/stateProcess.js index 8c22d355887ba359f69c392d8671aa574cdc376d..f1febe96416f12e029c6de6537cf96e5c7f4d5db 100644 --- a/entity/Member_entity/entityfields/msteamsactiongroup/children/addapp/stateProcess.js +++ b/entity/Member_entity/entityfields/msteamsactiongroup/children/addapp/stateProcess.js @@ -5,27 +5,12 @@ import("system.result"); import("Sql_lib"); var res = neon.COMPONENTSTATE_DISABLED; -var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null; +var teamId = vars.get("$param.MSTTeamId_param"); if (teamId && MSTeamsUtils.isTeamsEnabled()) { - var isArchived, serviceUrl; - var teamData = newSelect("IS_ARCHIVED, SERVICE_URL") - .from("MST_TEAM") - .whereIfSet("MST_TEAM.MST_TEAMID", teamId) - .arrayRow(true); - - if (teamData) - [isArchived, serviceUrl] = teamData; - - - if (isArchived == 1 || serviceUrl) - { - res = neon.COMPONENTSTATE_DISABLED; - } - else - { + var teamInfo = MSTeamsUtils.getTeamInfo(teamId); + if (teamInfo && !teamInfo.isArchived && !teamInfo.serviceUrl) res = neon.COMPONENTSTATE_EDITABLE; - } } result.string(res); \ No newline at end of file diff --git a/entity/Member_entity/entityfields/msteamsactiongroup/children/deleteteam/stateProcess.js b/entity/Member_entity/entityfields/msteamsactiongroup/children/deleteteam/stateProcess.js index ff7327ea21424cb3394d6d204c49cc42d49296da..dcaec1cc02ac3718197fd77a80e966630bdc0e1d 100644 --- a/entity/Member_entity/entityfields/msteamsactiongroup/children/deleteteam/stateProcess.js +++ b/entity/Member_entity/entityfields/msteamsactiongroup/children/deleteteam/stateProcess.js @@ -2,30 +2,14 @@ import("MSTeams_lib"); import("system.vars"); import("system.neon"); import("system.result"); -import("Sql_lib"); var res = neon.COMPONENTSTATE_DISABLED; -var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null; +var teamId = vars.get("$param.MSTTeamId_param"); if (teamId && MSTeamsUtils.isTeamsEnabled()) { - var isArchived, serviceUrl; - var teamData = newSelect("IS_ARCHIVED, SERVICE_URL") - .from("MST_TEAM") - .whereIfSet("MST_TEAM.MST_TEAMID", teamId) - .arrayRow(true); - - if (teamData) - [isArchived, serviceUrl] = teamData; - - - if (isArchived == 1 || serviceUrl || !MSTeamsUtils.isUserTeamOwner(teamId)) - { - res = neon.COMPONENTSTATE_DISABLED; - } - else - { + var teamInfo = MSTeamsUtils.getTeamInfo(teamId); + if (teamInfo && !teamInfo.isArchived && !teamInfo.serviceUrl && MSTeamsUtils.isUserTeamOwner(teamId)) res = neon.COMPONENTSTATE_EDITABLE; - } } result.string(res); \ No newline at end of file diff --git a/entity/Member_entity/entityfields/msteamsactiongroup/children/editteam/stateProcess.js b/entity/Member_entity/entityfields/msteamsactiongroup/children/editteam/stateProcess.js index 19d44a29c7aa78d785175ef6ea98d680670f97d2..7aa4197a0d2f1be51667f68696e2ecf18cbf3bc1 100644 --- a/entity/Member_entity/entityfields/msteamsactiongroup/children/editteam/stateProcess.js +++ b/entity/Member_entity/entityfields/msteamsactiongroup/children/editteam/stateProcess.js @@ -2,30 +2,12 @@ import("MSTeams_lib"); import("system.vars"); import("system.neon"); import("system.result"); -import("Sql_lib"); var res = neon.COMPONENTSTATE_DISABLED; -var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null; -if (teamId && MSTeamsUtils.isTeamsEnabled()) -{ - var isArchived, serviceUrl; - var teamData = newSelect("IS_ARCHIVED, SERVICE_URL") - .from("MST_TEAM") - .whereIfSet("MST_TEAM.MST_TEAMID", teamId) - .arrayRow(true); - - if (teamData) - [isArchived, serviceUrl] = teamData; - - - if (isArchived == 1 || !MSTeamsUtils.isUserTeamOwner(teamId)) - { - res = neon.COMPONENTSTATE_DISABLED; - } - else - { - res = neon.COMPONENTSTATE_EDITABLE; - } +var teamId = vars.get("$param.MSTTeamId_param"); +if (teamId && MSTeamsUtils.isTeamsEnabled() && MSTeamsUtils.isTeamActive(teamId) && MSTeamsUtils.isUserTeamOwner(teamId)) +{ + res = neon.COMPONENTSTATE_EDITABLE; } result.string(res); \ No newline at end of file diff --git a/entity/Member_entity/entityfields/msteamsactiongroup/children/openmsteams/onActionProcess.js b/entity/Member_entity/entityfields/msteamsactiongroup/children/openmsteams/onActionProcess.js index 19f20d51a62115ea00b95eba76f5c733eccddea5..dd6293385c56357965b6ddd53fa1f5611b6bcf72 100644 --- a/entity/Member_entity/entityfields/msteamsactiongroup/children/openmsteams/onActionProcess.js +++ b/entity/Member_entity/entityfields/msteamsactiongroup/children/openmsteams/onActionProcess.js @@ -1,11 +1,8 @@ -import("Sql_lib"); +import("MSTeams_lib"); import("system.vars"); import("system.neon"); -var webUrl = newSelect("WEB_URL") - .from("MST_TEAM") - .whereIfSet("MST_TEAM.MST_TEAMID", "$param.MSTTeamId_param") - .cell(true); +var teamInfo = MSTeamsUtils.getTeamInfo(vars.get("$param.MSTTeamId_param")); -if (webUrl) - neon.openUrl(webUrl, true); +if (teamInfo && teamInfo.webUrl) + neon.openUrl(teamInfo.webUrl, true); diff --git a/entity/Member_entity/entityfields/msteamsactiongroup/children/openmsteams/stateProcess.js b/entity/Member_entity/entityfields/msteamsactiongroup/children/openmsteams/stateProcess.js index 43b7cdd5eadeb6f287b2e2d24f3391c91360ee68..ce25c1feb1a1c2247dc19707bd447b5096e04184 100644 --- a/entity/Member_entity/entityfields/msteamsactiongroup/children/openmsteams/stateProcess.js +++ b/entity/Member_entity/entityfields/msteamsactiongroup/children/openmsteams/stateProcess.js @@ -5,22 +5,10 @@ import("system.result"); import("Sql_lib"); var res = neon.COMPONENTSTATE_DISABLED; -var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null; -if (teamId && MSTeamsUtils.isTeamsEnabled()) +var teamId = vars.get("$param.MSTTeamId_param"); +if (teamId && MSTeamsUtils.isTeamsEnabled() && MSTeamsUtils.isTeamActive(teamId)) { - var isArchived = newSelect("IS_ARCHIVED") - .from("MST_TEAM") - .whereIfSet("MST_TEAM.MST_TEAMID", teamId) - .cell(true); - - if (isArchived == 1) - { - res = neon.COMPONENTSTATE_DISABLED; - } - else - { - res = neon.COMPONENTSTATE_EDITABLE; - } + res = neon.COMPONENTSTATE_EDITABLE; } result.string(res); \ No newline at end of file diff --git a/entity/Member_entity/entityfields/msteamsactiongroup/children/restoreteam/stateProcess.js b/entity/Member_entity/entityfields/msteamsactiongroup/children/restoreteam/stateProcess.js index f6f0a5da09790cfe007d834b76e59a4397c0355e..45ca08b1622ea01f75c5029fbb125be25fba87c5 100644 --- a/entity/Member_entity/entityfields/msteamsactiongroup/children/restoreteam/stateProcess.js +++ b/entity/Member_entity/entityfields/msteamsactiongroup/children/restoreteam/stateProcess.js @@ -5,27 +5,12 @@ import("system.result"); import("Sql_lib"); var res = neon.COMPONENTSTATE_DISABLED; -var teamId = vars.exists("$param.MSTTeamId_param") ? vars.get("$param.MSTTeamId_param") : null; +var teamId = vars.get("$param.MSTTeamId_param"); if (teamId && MSTeamsUtils.isTeamsEnabled()) -{ - var isArchived, serviceUrl; - var teamData = newSelect("IS_ARCHIVED, SERVICE_URL") - .from("MST_TEAM") - .whereIfSet("MST_TEAM.MST_TEAMID", teamId) - .arrayRow(true); - - if (teamData) - [isArchived, serviceUrl] = teamData; - - - if (isArchived == 0) - { - res = neon.COMPONENTSTATE_DISABLED; - } - else - { +{ + var teamInfo = MSTeamsUtils.getTeamInfo(teamId); + if (teamInfo && teamInfo.isArchived) res = neon.COMPONENTSTATE_EDITABLE; - } } result.string(res); \ No newline at end of file diff --git a/entity/Member_entity/entityfields/object_rowid/displayValueProcess.js b/entity/Member_entity/entityfields/object_rowid/displayValueProcess.js index 8b080bceea92c146a676b0f33cc7cb87d4e86b9d..95c4eea5367140dc2d81e470ba0607adf52f07c1 100644 --- a/entity/Member_entity/entityfields/object_rowid/displayValueProcess.js +++ b/entity/Member_entity/entityfields/object_rowid/displayValueProcess.js @@ -7,5 +7,5 @@ import("Context_lib"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$field.OBJECT_ROWID")) { result.string(""); } else if (vars.exists("$field.OBJECT_TYPE") && vars.get("$field.OBJECT_TYPE")) { - result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID")))); + result.string(ContextUtils.getTitleByContext(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID"))); } \ No newline at end of file diff --git a/entity/Member_entity/recordcontainers/db/conditionProcess.js b/entity/Member_entity/recordcontainers/db/conditionProcess.js index 8ea033217e401e458c462cc899184bf4f8b24cd1..ce742b4d37acd1af594044cc09f317b8279ad3ee 100644 --- a/entity/Member_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Member_entity/recordcontainers/db/conditionProcess.js @@ -6,5 +6,4 @@ var cond = newWhere() .andIfSet("OBJECTMEMBER.OBJECT_ROWID", "$param.ObjectRowId_param") .andIfSet("OBJECTMEMBER.OBJECT_TYPE", "$param.ObjectType_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Member_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js b/entity/Member_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js deleted file mode 100644 index a5d62617bee8630b78204e4bc85c851dba3b10df..0000000000000000000000000000000000000000 --- a/entity/Member_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js +++ /dev/null @@ -1,10 +0,0 @@ -import("system.vars"); -import("system.result"); -import("Context_lib"); - -//TODO: refactor: -//whenever we want to shrink data for a single object it's not needed to resolve the objects name where we're from -if (vars.get("$param.ObjectType_param") == null) - result.string(ContextUtils.getNameSubselectSql("OBJECTMEMBER.OBJECT_TYPE", "OBJECTMEMBER.OBJECT_ROWID")); -else - result.string("'OBJECT_ROWID.displayValue not loaded'"); \ No newline at end of file diff --git a/entity/Notification_entity/Notification_entity.aod b/entity/Notification_entity/Notification_entity.aod index cf3203213ac627ef13ec8064010448a7db4a5970..2668a0419e9a0b0d0d74c0f6f25867fd05c13faf 100644 --- a/entity/Notification_entity/Notification_entity.aod +++ b/entity/Notification_entity/Notification_entity.aod @@ -132,31 +132,31 @@ </entityField> <entityConsumer> <name>StateKeywords</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>#PROVIDER</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Notification_entity/entityfields/statekeywords/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>PrioKeywords</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>#PROVIDER</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>PrioKeywords</name> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Notification_entity/entityfields/priokeywords/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>#PROVIDER</fieldName> + </dependency> </entityConsumer> <entityProvider> <name>#PROVIDER_AGGREGATES</name> @@ -170,6 +170,10 @@ <outputFormat>dd.MM.yyyy</outputFormat> <inputFormat>dd.MM.yyyy</inputFormat> </entityField> + <entityField> + <name>SUBCATEGORY</name> + <title>Subcategory</title> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -281,6 +285,12 @@ <name>CREATEDAY.value</name> <recordfield>ASYS_NOTIFICATIONCONTENTS.CREATEDATE</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>SUBCATEGORY.value</name> + <recordfield>ASYS_NOTIFICATIONCONTENTS.SUBCATEGORY</recordfield> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/Notification_entity/recordcontainers/db/onDBDelete.js b/entity/Notification_entity/recordcontainers/db/onDBDelete.js index 633f720b18b2200627fe56df8fc0289ae984e7fc..ecd41a4a7a4731ed092c070714bad37a909deccf 100644 --- a/entity/Notification_entity/recordcontainers/db/onDBDelete.js +++ b/entity/Notification_entity/recordcontainers/db/onDBDelete.js @@ -4,4 +4,4 @@ import("system.notification"); // Deletes notificationContents from its table, if there are no user notification left // Only AppointmentContents need to stay, because they would appear again after every deletion. if(vars.get("$field.TYPECODE") != "_____SYSTEM_NOTIFICATION_APPOINTMENT") - notification.deleteContentIfOrphan([vars.get("$field.CONTENTID")]); \ No newline at end of file + notification.deleteMultipleContentsIfOrphan([vars.get("$field.CONTENTID")]); \ No newline at end of file diff --git a/entity/ObjectProxy_entity/ObjectProxy_entity.aod b/entity/ObjectProxy_entity/ObjectProxy_entity.aod index e197c4de792ba0f970f0db5ece17bb62131cd944..8eb6e53ec1fac158f5a89f6eed26678277279810 100644 --- a/entity/ObjectProxy_entity/ObjectProxy_entity.aod +++ b/entity/ObjectProxy_entity/ObjectProxy_entity.aod @@ -18,6 +18,7 @@ <entityProvider> <name>FilteredObjects</name> <targetConsumerProcess>%aditoprj%/entity/ObjectProxy_entity/entityfields/filteredobjects/targetConsumerProcess.js</targetConsumerProcess> + <documentation>%aditoprj%/entity/ObjectProxy_entity/entityfields/filteredobjects/documentation.adoc</documentation> <dependencies> <entityDependency> <name>92e21c48-19aa-402c-b75f-96cad75d8a14</name> diff --git a/entity/ObjectProxy_entity/entityfields/filteredobjects/documentation.adoc b/entity/ObjectProxy_entity/entityfields/filteredobjects/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..1c4b46dd5e5b005c54afe5060159e4897799d352 --- /dev/null +++ b/entity/ObjectProxy_entity/entityfields/filteredobjects/documentation.adoc @@ -0,0 +1,3 @@ += FilteredObjects + +This provider can retrieve objects of the given entity, the results can be filtered. \ No newline at end of file diff --git a/entity/ObjectTree_entity/entityfields/target_id/displayValueProcess.js b/entity/ObjectTree_entity/entityfields/target_id/displayValueProcess.js index d074689525fa0fc64cc41002e883c2c8cd5579f3..81438bdcb9fc7b302aebf1c0fdcf797bef0334c3 100644 --- a/entity/ObjectTree_entity/entityfields/target_id/displayValueProcess.js +++ b/entity/ObjectTree_entity/entityfields/target_id/displayValueProcess.js @@ -6,5 +6,5 @@ import("Context_lib"); if (vars.get("$field.TARGET_ID") && vars.get("$field.TARGET_CONTEXT")) { - result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.TARGET_CONTEXT"), vars.get("$field.TARGET_ID")))); + result.string(ContextUtils.getTitleByContext(vars.get("$field.TARGET_CONTEXT"), vars.get("$field.TARGET_ID"))); } \ No newline at end of file diff --git a/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js b/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js index d1d925c81b4e8fbd86046d8211e7366524b23882..7980a2bd4337487f4d163001299d364840e52f4e 100644 --- a/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js @@ -298,7 +298,7 @@ function _insertEntry(pTree, pEntryData, pNodeId, pLayer, pObjectType, pNewRelat pEntryData.forEach(function ([objectId, objectRelationId, objectType, relationTitle, info, objectRelationTypeId], i) { //TODO: entities.getRow, check if this is possible with fewer queries - var display = db.cell(ContextUtils.getNameSql(pObjectType, objectId)); + var display = ContextUtils.getTitleByContext(pObjectType, objectId); // TODO: Icon var uid = [objectId, i, objectRelationTypeId, pObjectType, pNodeId, objectType, objectRelationId, pHierarchy]; diff --git a/entity/Object_entity/Object_entity.aod b/entity/Object_entity/Object_entity.aod index 1a571fad307eb9e7e768bdfa12c553247e3ec376..e3633e2483c72e9e19c36651dd093c209f4b90d0 100644 --- a/entity/Object_entity/Object_entity.aod +++ b/entity/Object_entity/Object_entity.aod @@ -283,6 +283,14 @@ <fieldName>#PROVIDER</fieldName> </dependency> </entityConsumer> + <entityConsumer> + <name>Leadimports</name> + <dependency> + <name>dependency</name> + <entityName>Leadimport_entity</entityName> + <fieldName>#PROVIDER</fieldName> + </dependency> + </entityConsumer> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/Object_entity/recordcontainers/jdito/contentProcess.js b/entity/Object_entity/recordcontainers/jdito/contentProcess.js index 27b0b7e83a11771b4ea8be2716a3fd61d1c5a6a7..bf77eb9a2d0f0df969843311c18f5bc4eb29738b 100644 --- a/entity/Object_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Object_entity/recordcontainers/jdito/contentProcess.js @@ -19,7 +19,7 @@ if (vars.get("$param.ObjectType_param")) if (vars.exists("$param.ContactId") && vars.get("$param.ContactId")) contactId = vars.get("$param.ContactId"); - result.object(db.table(ContextUtils.getContextDataSql(objectType, contactId, false, undefined, false, null, null, excludedIds))) + result.object(ContextUtils.loadContent(ContextUtils.getEntity(objectType), [contactId], ["#UID", "#CONTENTTITLE"], excludedIds)) } else { diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod index 0491466e0b6a47b54b5d0c67d48d8d4b7a891d31..e486ce29844d16dea182c205a9b5cdb696acfdf5 100644 --- a/entity/Offer_entity/Offer_entity.aod +++ b/entity/Offer_entity/Offer_entity.aod @@ -10,6 +10,7 @@ <grantUpdateProcess>%aditoprj%/entity/Offer_entity/grantUpdateProcess.js</grantUpdateProcess> <grantDeleteProcess>%aditoprj%/entity/Offer_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/Offer_entity/contentTitleProcess.js</contentTitleProcess> + <contentDescriptionProcess>%aditoprj%/entity/Offer_entity/contentDescriptionProcess.js</contentDescriptionProcess> <afterUiInit>%aditoprj%/entity/Offer_entity/afterUiInit.js</afterUiInit> <useFavorites v="true" /> <iconId>VAADIN:CART</iconId> @@ -1052,6 +1053,9 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityField> + <name>ACTIVE</name> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -1243,10 +1247,6 @@ <name>OBJECT_TYPE.value</name> <recordfield>OFFER.OBJECT_TYPE</recordfield> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>OBJECT_ROWID.displayValue</name> - <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js</expression> - </dbRecordFieldMapping> <dbRecordFieldMapping> <name>CONTACT_ID.value</name> <recordfield>OFFER.CONTACT_ID</recordfield> @@ -1304,6 +1304,10 @@ <name>OFFER_ID.value</name> <recordfield>OFFER.OFFER_ID</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ACTIVE.value</name> + <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <filterExtensions> <filterExtensionSet> diff --git a/entity/Offer_entity/contentDescriptionProcess.js b/entity/Offer_entity/contentDescriptionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..f1afab18db7ad38a661329de19f0554dac92285c --- /dev/null +++ b/entity/Offer_entity/contentDescriptionProcess.js @@ -0,0 +1,12 @@ +import("Util_lib"); +import("system.eMath"); +import("system.translate"); +import("system.datetime"); +import("system.vars"); +import("system.result"); + +var res = [translate.text("Total gross") + ": " + vars.get("$field.TotalGross.displayValue"), + translate.text("Probability") + ": " + vars.get("$field.PROBABILITY.displayValue"), + translate.text("Creation date") + ": " + datetime.toDate(vars.get("$field.DATE_NEW"), translate.text("dd.MM.yyyy"))]; + +result.string(res.join(" | ")); \ No newline at end of file diff --git a/entity/Offer_entity/contentTitleProcess.js b/entity/Offer_entity/contentTitleProcess.js index 98f9e420320b5614344632935f8bb864a240052e..e90d32e0f10a837286539bbe79d4558449dd6b19 100644 --- a/entity/Offer_entity/contentTitleProcess.js +++ b/entity/Offer_entity/contentTitleProcess.js @@ -1,4 +1,6 @@ import("system.vars"); import("system.result"); -result.string(vars.get("$field.OfferCode_VersNr_fieldgroup")); \ No newline at end of file +var res = [vars.get("$field.OfferCode_VersNr_fieldgroup"), vars.get("$field.STATUS.displayValue")] + +result.string(res.join(" | ")); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/object_rowid/displayValueProcess.js b/entity/Offer_entity/entityfields/object_rowid/displayValueProcess.js index fe2b7c72502d9937add9b539ed38483e6ca4bd51..8074aca46e2680d0b0d19060e41f370b84830fa1 100644 --- a/entity/Offer_entity/entityfields/object_rowid/displayValueProcess.js +++ b/entity/Offer_entity/entityfields/object_rowid/displayValueProcess.js @@ -7,5 +7,5 @@ import("Context_lib"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$field.OBJECT_ROWID") == null) { result.string(""); } else if (vars.exists("$field.OBJECT_TYPE") && vars.get("$field.OBJECT_TYPE")) { - result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID")))); + result.string(ContextUtils.getTitleByContext(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID"))); } \ No newline at end of file diff --git a/entity/Offer_entity/recordcontainers/db/conditionProcess.js b/entity/Offer_entity/recordcontainers/db/conditionProcess.js index 001612ec1946c47b24fee4e07a2273b60586162e..eabc7f2454152f89cb58b7cd582e76dc41cdcdd6 100644 --- a/entity/Offer_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Offer_entity/recordcontainers/db/conditionProcess.js @@ -14,5 +14,4 @@ else { cond.andIfSet("OFFER.STATUS", "$param.OfferStatus_param") -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Offer_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js b/entity/Offer_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..6da46407ad55e7e624304130313492b538a2d012 --- /dev/null +++ b/entity/Offer_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js @@ -0,0 +1,6 @@ +import("Context_lib"); +import("system.result"); +import("KeywordRegistry_basic"); + +var activArr = [$KeywordRegistry.offerStatus$open(), $KeywordRegistry.offerStatus$checked(), $KeywordRegistry.offerStatus$sent()]; +result.string(ContextUtils.buildActiveCaseWhen(activArr, "OFFER.STATUS")); \ No newline at end of file diff --git a/entity/Offer_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js b/entity/Offer_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js deleted file mode 100644 index c0332af5cb599a99d062e3828f354ebfd005273f..0000000000000000000000000000000000000000 --- a/entity/Offer_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.result"); -import("Context_lib"); - -result.string(ContextUtils.getNameSubselectSql("OFFER.OBJECT_TYPE", "OFFER.OBJECT_ROWID")) \ No newline at end of file diff --git a/entity/Offeritem_entity/recordcontainers/db/conditionProcess.js b/entity/Offeritem_entity/recordcontainers/db/conditionProcess.js index 82c536561aaac4f8a876433b2311a932cc7b50f4..ee1e6cbd8479673064d2d5aa2350046f148b9102 100644 --- a/entity/Offeritem_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Offeritem_entity/recordcontainers/db/conditionProcess.js @@ -5,5 +5,4 @@ import("system.vars"); var cond = newWhereIfSet("OFFERITEM.OFFER_ID", "$param.OfferId_param") -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Order_entity/Order_entity.aod b/entity/Order_entity/Order_entity.aod index ae39a7c436493de461a6b378849dbaee88d57bc2..64b551ee2df1561b3ccfbb6e88f07aae263c0836 100644 --- a/entity/Order_entity/Order_entity.aod +++ b/entity/Order_entity/Order_entity.aod @@ -6,6 +6,7 @@ <title>Receipt</title> <grantDeleteProcess>%aditoprj%/entity/Order_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/Order_entity/contentTitleProcess.js</contentTitleProcess> + <contentDescriptionProcess>%aditoprj%/entity/Order_entity/contentDescriptionProcess.js</contentDescriptionProcess> <afterUiInit>%aditoprj%/entity/Order_entity/afterUiInit.js</afterUiInit> <useFavorites v="true" /> <iconId>VAADIN:DOLLAR</iconId> @@ -28,6 +29,12 @@ <fieldName>Orders</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>bfc738ad-8af3-4d2b-9ed5-b3ca2212bb9e</name> + <entityName>Person_entity</entityName> + <fieldName>Orders</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> </entityProvider> <entityField> @@ -100,6 +107,11 @@ <entityConsumer> <name>Orderitems</name> <description></description> + <dependency> + <name>dependency</name> + <entityName>Orderitem_entity</entityName> + <fieldName>Orderitems</fieldName> + </dependency> <children> <entityParameter> <name>OrderId_param</name> @@ -125,11 +137,6 @@ <mandatory v="true" /> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Orderitem_entity</entityName> - <fieldName>Orderitems</fieldName> - </dependency> </entityConsumer> <entityField> <name>NET</name> @@ -191,6 +198,11 @@ <entityConsumer> <name>Documents</name> <selectionMode>MULTI</selectionMode> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>Documents</fieldName> + </dependency> <children> <entityParameter> <name>AssignmentRowId_param</name> @@ -201,15 +213,15 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>Documents</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>MainDocuments</name> <stateProcess>%aditoprj%/entity/Order_entity/entityfields/maindocuments/stateProcess.js</stateProcess> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>MainDocuments</fieldName> + </dependency> <children> <entityParameter> <name>AssignmentRowId_param</name> @@ -220,28 +232,28 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/maindocuments/children/assignmenttable_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>MainDocuments</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>Salesprojects</name> + <dependency> + <name>dependency</name> + <entityName>Salesproject_entity</entityName> + <fieldName>Salesprojects</fieldName> + </dependency> <children> <entityParameter> <name>ContactId_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/salesprojects/children/contactid_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Salesproject_entity</entityName> - <fieldName>Salesprojects</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>KeywordCurrencies</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> <children> <entityParameter> <name>ContainerName_param</name> @@ -249,14 +261,14 @@ <expose v="false" /> </entityParameter> </children> + </entityConsumer> + <entityConsumer> + <name>KeywordStates</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> - </entityConsumer> - <entityConsumer> - <name>KeywordStates</name> <children> <entityParameter> <name>ContainerName_param</name> @@ -264,11 +276,6 @@ <expose v="false" /> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>Languages</name> @@ -287,6 +294,11 @@ </entityParameter> <entityConsumer> <name>Activities</name> + <dependency> + <name>dependency</name> + <entityName>Activity_entity</entityName> + <fieldName>LinkedObjects</fieldName> + </dependency> <children> <entityParameter> <name>RowId_param</name> @@ -301,11 +313,6 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/activities/children/presetlinks_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Activity_entity</entityName> - <fieldName>LinkedObjects</fieldName> - </dependency> </entityConsumer> <entityField> <name>OFFER_ID</name> @@ -319,6 +326,11 @@ <entityConsumer> <name>Tasks</name> <stateProcess>%aditoprj%/entity/Order_entity/entityfields/tasks/stateProcess.js</stateProcess> + <dependency> + <name>dependency</name> + <entityName>Task_entity</entityName> + <fieldName>Tasks</fieldName> + </dependency> <children> <entityParameter> <name>RowId_param</name> @@ -333,15 +345,15 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/tasks/children/presetlinks_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Task_entity</entityName> - <fieldName>Tasks</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>Attributes</name> <onValidation>%aditoprj%/entity/Order_entity/entityfields/attributes/onValidation.js</onValidation> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>AttributeRelations</fieldName> + </dependency> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -352,15 +364,15 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>AttributeRelations</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>AttributeTree</name> <stateProcess>%aditoprj%/entity/Order_entity/entityfields/attributetree/stateProcess.js</stateProcess> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>TreeProvider</fieldName> + </dependency> <children> <entityParameter> <name>ObjectType_param</name> @@ -371,25 +383,20 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>TreeProvider</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>LogHistories</name> + <dependency> + <name>dependency</name> + <entityName>LogHistory_entity</entityName> + <fieldName>LogHistoryProvider</fieldName> + </dependency> <children> <entityParameter> <name>tablenames_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>LogHistory_entity</entityName> - <fieldName>LogHistoryProvider</fieldName> - </dependency> </entityConsumer> <entityField> <name>ORDERTYPE</name> @@ -467,31 +474,31 @@ </entityField> <entityConsumer> <name>KeywordOrderTypes</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/keywordordertypes/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> + </entityConsumer> + <entityConsumer> + <name>KeywordDunningLevels</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> - </entityConsumer> - <entityConsumer> - <name>KeywordDunningLevels</name> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/keyworddunninglevels/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> </entityConsumer> <entityField> <name>OBJECT_ROWID</name> @@ -519,6 +526,11 @@ </entityField> <entityConsumer> <name>Objects</name> + <dependency> + <name>dependency</name> + <entityName>Object_entity</entityName> + <fieldName>FilteredObjects</fieldName> + </dependency> <children> <entityParameter> <name>ContactId_param</name> @@ -529,14 +541,14 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/objects/children/objecttype_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Object_entity</entityName> - <fieldName>FilteredObjects</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>Contexts</name> + <dependency> + <name>dependency</name> + <entityName>Context_entity</entityName> + <fieldName>Exclusive</fieldName> + </dependency> <children> <entityParameter> <name>Blacklist_param</name> @@ -547,11 +559,6 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/contexts/children/invertblacklist_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Context_entity</entityName> - <fieldName>Exclusive</fieldName> - </dependency> </entityConsumer> <entityParameter> <name>PossibleConnectionTypes</name> @@ -604,46 +611,46 @@ </entityField> <entityConsumer> <name>KeywordPaymentTerms</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/keywordpaymentterms/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> + </entityConsumer> + <entityConsumer> + <name>KeywordDeliveryTerms</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> - </entityConsumer> - <entityConsumer> - <name>KeywordDeliveryTerms</name> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/keyworddeliveryterms/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>PossibleAddresses</name> <documentation>%aditoprj%/entity/Order_entity/entityfields/possibleaddresses/documentation.adoc</documentation> + <dependency> + <name>dependency</name> + <entityName>Address_entity</entityName> + <fieldName>OrganisationAndContactAddresses</fieldName> + </dependency> <children> <entityParameter> <name>ContactId_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/possibleaddresses/children/contactid_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Address_entity</entityName> - <fieldName>OrganisationAndContactAddresses</fieldName> - </dependency> </entityConsumer> <entityField> <name>NOTICE</name> @@ -660,20 +667,25 @@ </entityField> <entityConsumer> <name>Offers</name> + <dependency> + <name>dependency</name> + <entityName>Offer_entity</entityName> + <fieldName>ContactOffers</fieldName> + </dependency> <children> <entityParameter> <name>ContactId_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/offers/children/contactid_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Offer_entity</entityName> - <fieldName>ContactOffers</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>DocumentTemplateTexHeader</name> + <dependency> + <name>dependency</name> + <entityName>DocumentTemplate_entity</entityName> + <fieldName>DocumentTemplateProvider</fieldName> + </dependency> <children> <entityParameter> <name>DocumentTemplateType_param</name> @@ -684,14 +696,14 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/documenttemplatetexheader/children/documenttemplatetypeclassification_param/valueProcess.js</valueProcess> </entityParameter> </children> + </entityConsumer> + <entityConsumer> + <name>DocumentTemplateTexFooter</name> <dependency> <name>dependency</name> <entityName>DocumentTemplate_entity</entityName> <fieldName>DocumentTemplateProvider</fieldName> </dependency> - </entityConsumer> - <entityConsumer> - <name>DocumentTemplateTexFooter</name> <children> <entityParameter> <name>DocumentTemplateType_param</name> @@ -702,11 +714,6 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/documenttemplatetexfooter/children/documenttemplatetypeclassification_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>DocumentTemplate_entity</entityName> - <fieldName>DocumentTemplateProvider</fieldName> - </dependency> </entityConsumer> <entityField> <name>ChosenTexHeader</name> @@ -918,6 +925,14 @@ <expose v="true" /> <description></description> </entityParameter> + <entityField> + <name>DATE_NEW</name> + <contentType>DATE</contentType> + <resolution>DAY</resolution> + </entityField> + <entityField> + <name>ACTIVE</name> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -1074,14 +1089,6 @@ <name>OBJECT_ROWID.value</name> <recordfield>SALESORDER.OBJECT_ROWID</recordfield> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>OBJECT_ROWID.displayValue</name> - <expression>%aditoprj%/entity/Order_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js</expression> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>OFFER_ID.displayValue</name> - <expression>%aditoprj%/entity/Order_entity/recordcontainers/db/recordfieldmappings/offer_id.displayvalue/expression.js</expression> - </dbRecordFieldMapping> <dbRecordFieldMapping> <name>OBJECT_TYPE.value</name> <recordfield>SALESORDER.OBJECT_TYPE</recordfield> @@ -1141,6 +1148,14 @@ <recordfield>SALESORDER.SALESORDERID</recordfield> <aggregateType>COUNT</aggregateType> </aggregateFieldDbMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>SALESORDER.SALESORDERDATE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ACTIVE.value</name> + <expression>%aditoprj%/entity/Order_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <filterExtensions> <filterExtension> diff --git a/entity/Order_entity/contentDescriptionProcess.js b/entity/Order_entity/contentDescriptionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..bd351d26e62473bda001b51a8393d3ed4f2cdb19 --- /dev/null +++ b/entity/Order_entity/contentDescriptionProcess.js @@ -0,0 +1,19 @@ +import("system.logging"); +import("system.translate"); +import("system.datetime"); +import("system.vars"); +import("system.result"); +import("KeywordRegistry_basic"); + +var orderstatus = vars.get("$field.ORDERSTATUS") == "1" ? translate.text("Yes"): translate.text("No") + +var res = [translate.text("Sent") + ": " + orderstatus, + translate.text("Total gross") + ": " + vars.get("$field.TotalGross.displayValue")] + +if(vars.get("$field.PAYDATE")) + res.push(translate.text("Pay date") + ": " + datetime.toDate(vars.get("$field.PAYDATE"), translate.text("dd.MM.yyyy"))) + + +res.push(translate.text("Creation date") + ": " + datetime.toDate(vars.get("$field.DATE_NEW"), translate.text("dd.MM.yyyy"))); + +result.string(res.join(" | ")); \ No newline at end of file diff --git a/entity/Order_entity/contentTitleProcess.js b/entity/Order_entity/contentTitleProcess.js index efca7174f4eba418870382ab3a958d1428e7d247..376625c4943175ab2b0f7f9b5da3a2e7c9d66f4f 100644 --- a/entity/Order_entity/contentTitleProcess.js +++ b/entity/Order_entity/contentTitleProcess.js @@ -4,4 +4,9 @@ import("system.translate"); import("system.vars"); import("system.result"); -result.string(KeywordUtils.getViewValue($KeywordRegistry.orderType(), vars.get("$field.ORDERTYPE")) +" - "+ vars.get("$field.SALESORDERCODE")); +var res = [vars.get("$field.SALESORDERCODE")]; + +if(vars.get("$field.CANCELLATION") == "1") + res.push(translate.text("${ORDER_CANCELLED}")); + +result.string(res.join(" | ")); diff --git a/entity/Order_entity/entityfields/object_rowid/displayValueProcess.js b/entity/Order_entity/entityfields/object_rowid/displayValueProcess.js index 8b080bceea92c146a676b0f33cc7cb87d4e86b9d..95c4eea5367140dc2d81e470ba0607adf52f07c1 100644 --- a/entity/Order_entity/entityfields/object_rowid/displayValueProcess.js +++ b/entity/Order_entity/entityfields/object_rowid/displayValueProcess.js @@ -7,5 +7,5 @@ import("Context_lib"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$field.OBJECT_ROWID")) { result.string(""); } else if (vars.exists("$field.OBJECT_TYPE") && vars.get("$field.OBJECT_TYPE")) { - result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID")))); + result.string(ContextUtils.getTitleByContext(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID"))); } \ No newline at end of file diff --git a/entity/Order_entity/recordcontainers/db/conditionProcess.js b/entity/Order_entity/recordcontainers/db/conditionProcess.js index d799cf12382ac030ddeeb35b7e61e891c2a07f6e..572d8249ded4490fb35322640e28b49764831b3f 100644 --- a/entity/Order_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Order_entity/recordcontainers/db/conditionProcess.js @@ -11,5 +11,4 @@ else { cond.andIfSet("SALESORDER.OBJECT_ROWID", "$param.ObjectRowId_param") .andIfSet("SALESORDER.OBJECT_TYPE", "$param.ObjectType_param"); } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Order_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js b/entity/Order_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..b6235593124a2fa09d7432f19455a4dc4cc42dda --- /dev/null +++ b/entity/Order_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js @@ -0,0 +1,6 @@ +import("Context_lib"); +import("system.result"); +import("KeywordRegistry_basic"); + +var activArr = [0, 1]; +result.string(ContextUtils.buildActiveCaseWhen(activArr, "SALESORDER.ORDERSTATUS")); \ No newline at end of file diff --git a/entity/Order_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js b/entity/Order_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js deleted file mode 100644 index bbe883a82964ab9693ce6c4fca792a9c27e01363..0000000000000000000000000000000000000000 --- a/entity/Order_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.result"); -import("Context_lib"); - -result.string(ContextUtils.getNameSubselectSql("SALESORDER.OBJECT_TYPE", "SALESORDER.OBJECT_ROWID")) \ No newline at end of file diff --git a/entity/Order_entity/recordcontainers/db/recordfieldmappings/offer_id.displayvalue/expression.js b/entity/Order_entity/recordcontainers/db/recordfieldmappings/offer_id.displayvalue/expression.js deleted file mode 100644 index cb7fa7682e14113a60f86371e225422c41d088bf..0000000000000000000000000000000000000000 --- a/entity/Order_entity/recordcontainers/db/recordfieldmappings/offer_id.displayvalue/expression.js +++ /dev/null @@ -1,5 +0,0 @@ -import("system.result"); -import("Context_lib"); -import("system.db"); - -result.string(db.translateStatement(ContextUtils.getNameSql("Offer", null, "SALESORDER.OFFER_ID"))); \ No newline at end of file diff --git a/entity/Orderitem_entity/recordcontainers/db/conditionProcess.js b/entity/Orderitem_entity/recordcontainers/db/conditionProcess.js index 5957207757012e79cce2cff0ed3316c780d85fec..6794f43bc98a7ee4099be70e2d1ce4215cccab26 100644 --- a/entity/Orderitem_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Orderitem_entity/recordcontainers/db/conditionProcess.js @@ -5,5 +5,4 @@ import("system.vars"); var cond = newWhereIfSet("SALESORDERITEM.SALESORDER_ID", "$param.OrderId_param") -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index 954f5023e7db14dc1375fc65415bd0487c4f21af..076fe1f6213c28183ea068723d42855cd05d09c4 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -7,6 +7,7 @@ <title>Company</title> <grantDeleteProcess>%aditoprj%/entity/Organisation_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/Organisation_entity/contentTitleProcess.js</contentTitleProcess> + <contentDescriptionProcess>%aditoprj%/entity/Organisation_entity/contentDescriptionProcess.js</contentDescriptionProcess> <afterUiInit>%aditoprj%/entity/Organisation_entity/afterUiInit.js</afterUiInit> <initFilterProcess>%aditoprj%/entity/Organisation_entity/initFilterProcess.js</initFilterProcess> <useFavorites v="true" /> @@ -71,11 +72,6 @@ </entityField> <entityConsumer> <name>Activities</name> - <dependency> - <name>dependency</name> - <entityName>Activity_entity</entityName> - <fieldName>LinkedObjects</fieldName> - </dependency> <children> <entityParameter> <name>RowId_param</name> @@ -86,21 +82,26 @@ <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/activities/children/objectid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Activity_entity</entityName> + <fieldName>LinkedObjects</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Contact</name> <selectionMode>MULTI</selectionMode> - <dependency> - <name>dependency</name> - <entityName>Person_entity</entityName> - <fieldName>OrganisationRelated</fieldName> - </dependency> <children> <entityParameter> <name>OrgId_param</name> <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/contact/children/orgid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Person_entity</entityName> + <fieldName>OrganisationRelated</fieldName> + </dependency> </entityConsumer> <entityFieldGroup> <name>CUSTOMERCODE_DISPLAY_fieldGroup</name> @@ -114,6 +115,36 @@ <name>Organisations</name> <documentation>%aditoprj%/entity/Organisation_entity/entityfields/organisations/documentation.adoc</documentation> <recordContainer>db</recordContainer> + <children> + <entityParameter> + <name>WithPrivate_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>ExcludeOrganisationsByPersonId</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ExcludedContactIds_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>AttributeKeyId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>AttributeId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>DuplicateActionsControl_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>DuplicateCurrentContactId_param</name> + <expose v="false" /> + </entityParameter> + </children> <dependencies> <entityDependency> <name>85aa363e-d8ba-4df5-8422-bf7aff86a4f8</name> @@ -152,44 +183,9 @@ <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>WithPrivate_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>ExcludeOrganisationsByPersonId</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>ExcludedContactIds_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>AttributeKeyId_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>AttributeId_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>DuplicateActionsControl_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>DuplicateCurrentContactId_param</name> - <expose v="false" /> - </entityParameter> - </children> </entityProvider> <entityConsumer> <name>Addresses</name> - <dependency> - <name>dependency</name> - <entityName>Address_entity</entityName> - <fieldName>OrganisationAddresses</fieldName> - </dependency> <children> <entityParameter> <name>DefaultAddressId_param</name> @@ -201,6 +197,11 @@ <expose v="false" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Address_entity</entityName> + <fieldName>OrganisationAddresses</fieldName> + </dependency> </entityConsumer> <entityField> <name>ADDRESS_ID</name> @@ -211,11 +212,6 @@ </entityField> <entityConsumer> <name>Communications</name> - <dependency> - <name>dependency</name> - <entityName>Communication_entity</entityName> - <fieldName>AllCommunications</fieldName> - </dependency> <children> <entityParameter> <name>ContactId_param</name> @@ -227,15 +223,15 @@ <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/communications/children/contactsmaincountry_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Communication_entity</entityName> + <fieldName>AllCommunications</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Contracts</name> <selectionMode>MULTI</selectionMode> - <dependency> - <name>dependency</name> - <entityName>Contract_entity</entityName> - <fieldName>Contracts</fieldName> - </dependency> <children> <entityParameter> <name>ContactId_param</name> @@ -244,14 +240,14 @@ <mandatory v="true" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>Productprices</name> <dependency> <name>dependency</name> - <entityName>Productprice_entity</entityName> - <fieldName>Productprices</fieldName> + <entityName>Contract_entity</entityName> + <fieldName>Contracts</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>Productprices</name> <children> <entityParameter> <name>ContactId_param</name> @@ -260,10 +256,14 @@ <mandatory v="true" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Productprice_entity</entityName> + <fieldName>Productprices</fieldName> + </dependency> </entityConsumer> <entityProvider> <name>#PROVIDER</name> - <sortingField>NAME</sortingField> <dependencies> <entityDependency> <name>1a472ca0-4d27-453c-8de5-a046b86f22fb</name> @@ -300,11 +300,6 @@ <entityConsumer> <name>Documents</name> <selectionMode>MULTI</selectionMode> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>Documents</fieldName> - </dependency> <children> <entityParameter> <name>AssignmentRowId_param</name> @@ -315,6 +310,11 @@ <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>Documents</fieldName> + </dependency> </entityConsumer> <entityField> <name>STANDARD_EMAIL_COMMUNICATION</name> @@ -330,11 +330,6 @@ </entityField> <entityConsumer> <name>PhoneCommunications</name> - <dependency> - <name>dependency</name> - <entityName>Communication_entity</entityName> - <fieldName>PhoneCommunications</fieldName> - </dependency> <children> <entityParameter> <name>ContactId_param</name> @@ -342,14 +337,14 @@ <expose v="false" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>EmailCommunications</name> <dependency> <name>dependency</name> <entityName>Communication_entity</entityName> - <fieldName>EmailCommunications</fieldName> + <fieldName>PhoneCommunications</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>EmailCommunications</name> <children> <entityParameter> <name>ContactId_param</name> @@ -357,6 +352,11 @@ <expose v="false" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Communication_entity</entityName> + <fieldName>EmailCommunications</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Countries</name> @@ -369,11 +369,6 @@ <entityConsumer> <name>Attributes</name> <onValidation>%aditoprj%/entity/Organisation_entity/entityfields/attributes/onValidation.js</onValidation> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>AttributeRelations</fieldName> - </dependency> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -385,14 +380,14 @@ <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>KeywordContactStates</name> <dependency> <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> + <entityName>AttributeRelation_entity</entityName> + <fieldName>AttributeRelations</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordContactStates</name> <children> <entityParameter> <name>ContainerName_param</name> @@ -400,14 +395,14 @@ <expose v="false" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>KeywordOrganisationTypes</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordOrganisationTypes</name> <children> <entityParameter> <name>ContainerName_param</name> @@ -415,6 +410,11 @@ <expose v="false" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Languages</name> @@ -426,11 +426,6 @@ </entityConsumer> <entityConsumer> <name>KeywordPricePolitics</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> @@ -438,14 +433,14 @@ <expose v="false" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>KeywordWeaknesses</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordWeaknesses</name> <children> <entityParameter> <name>ContainerName_param</name> @@ -453,14 +448,14 @@ <expose v="false" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>KeywordStrenghts</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordStrenghts</name> <children> <entityParameter> <name>ContainerName_param</name> @@ -468,14 +463,14 @@ <expose v="false" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>Salesprojects</name> <dependency> <name>dependency</name> - <entityName>Salesproject_entity</entityName> - <fieldName>Salesprojects</fieldName> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>Salesprojects</name> <children> <entityParameter> <name>ContactId_param</name> @@ -484,14 +479,14 @@ <mandatory v="true" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>Offers</name> <dependency> <name>dependency</name> - <entityName>Offer_entity</entityName> - <fieldName>ContactOffers</fieldName> + <entityName>Salesproject_entity</entityName> + <fieldName>Salesprojects</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>Offers</name> <children> <entityParameter> <name>ContactId_param</name> @@ -500,14 +495,14 @@ <mandatory v="true" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>Tasks</name> <dependency> <name>dependency</name> - <entityName>Task_entity</entityName> - <fieldName>Tasks</fieldName> + <entityName>Offer_entity</entityName> + <fieldName>ContactOffers</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>Tasks</name> <children> <entityParameter> <name>RowId_param</name> @@ -518,6 +513,11 @@ <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/tasks/children/objectid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Task_entity</entityName> + <fieldName>Tasks</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>WithPrivate_param</name> @@ -528,11 +528,6 @@ </entityParameter> <entityConsumer> <name>ObjectTrees</name> - <dependency> - <name>dependency</name> - <entityName>ObjectTree_entity</entityName> - <fieldName>TreeProvider</fieldName> - </dependency> <children> <entityParameter> <name>ObjectIds_param</name> @@ -543,14 +538,14 @@ <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/objecttrees/children/objecttypes_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>LogHistories</name> <dependency> <name>dependency</name> - <entityName>LogHistory_entity</entityName> - <fieldName>LogHistoryProvider</fieldName> + <entityName>ObjectTree_entity</entityName> + <fieldName>TreeProvider</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>LogHistories</name> <children> <entityParameter> <name>tablenames_param</name> @@ -559,14 +554,14 @@ <mandatory v="true" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>360DegreeObjects</name> <dependency> <name>dependency</name> - <entityName>360Degree_entity</entityName> - <fieldName>OrganisationObjects</fieldName> + <entityName>LogHistory_entity</entityName> + <fieldName>LogHistoryProvider</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>360DegreeObjects</name> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -577,6 +572,11 @@ <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/360degreeobjects/children/objectstatus_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>360Degree_entity</entityName> + <fieldName>OrganisationObjects</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>ExcludeOrganisationsByPersonId</name> @@ -587,26 +587,6 @@ <entityProvider> <name>WithPersonIdFilter</name> <documentation>%aditoprj%/entity/Organisation_entity/entityfields/withpersonidfilter/documentation.adoc</documentation> - <dependencies> - <entityDependency> - <name>5a456b04-f0ca-4a45-9c1f-bdfdf074434a</name> - <entityName>Contact_entity</entityName> - <fieldName>Organisations</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>a80c3db0-29db-433c-8f7c-4ebf6639ad6d</name> - <entityName>Person_entity</entityName> - <fieldName>Organisations</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>748a3083-89c2-41b4-a233-3fd5364396e9</name> - <entityName>Competition_entity</entityName> - <fieldName>Organisation</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>ExcludeOrganisationsByPersonId</name> @@ -639,6 +619,26 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>5a456b04-f0ca-4a45-9c1f-bdfdf074434a</name> + <entityName>Contact_entity</entityName> + <fieldName>Organisations</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>a80c3db0-29db-433c-8f7c-4ebf6639ad6d</name> + <entityName>Person_entity</entityName> + <fieldName>Organisations</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>748a3083-89c2-41b4-a233-3fd5364396e9</name> + <entityName>Competition_entity</entityName> + <fieldName>Organisation</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityParameter> <name>AttributeId_param</name> @@ -653,20 +653,6 @@ <entityProvider> <name>WithAttribute</name> <documentation>%aditoprj%/entity/Organisation_entity/entityfields/withattribute/documentation.adoc</documentation> - <dependencies> - <entityDependency> - <name>10480df2-f0b6-4cb6-8bfb-4a468b994996</name> - <entityName>Competition_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> @@ -698,6 +684,20 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>10480df2-f0b6-4cb6-8bfb-4a468b994996</name> + <entityName>Competition_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> </entityProvider> <entityParameter> <name>ExcludedContactIds_param</name> @@ -706,11 +706,6 @@ </entityParameter> <entityConsumer> <name>AttributeTree</name> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>TreeProvider</fieldName> - </dependency> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -721,6 +716,11 @@ <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/attributetree/children/objecttype_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>TreeProvider</fieldName> + </dependency> </entityConsumer> <entityField> <name>DATE_NEW</name> @@ -772,11 +772,6 @@ <entityConsumer> <name>AttributeConditions</name> <onValidation>%aditoprj%/entity/Organisation_entity/entityfields/attributeconditions/onValidation.js</onValidation> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>AttributeRelations</fieldName> - </dependency> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -799,14 +794,14 @@ <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/attributeconditions/children/showempty_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>LinkedAppointments</name> <dependency> <name>dependency</name> - <entityName>Appointment_entity</entityName> - <fieldName>LinkedAppointments</fieldName> + <entityName>AttributeRelation_entity</entityName> + <fieldName>AttributeRelations</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>LinkedAppointments</name> <children> <entityParameter> <name>LinkedObjectId_param</name> @@ -817,6 +812,11 @@ <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/linkedappointments/children/erroronpermissiondenied/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Appointment_entity</entityName> + <fieldName>LinkedAppointments</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Products</name> @@ -1054,6 +1054,8 @@ <name>IntegrateSelectedIntoCurrentAction</name> <title>Integrate selected into current contact</title> <onActionProcess>%aditoprj%/entity/Organisation_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> + <isObjectAction v="false" /> <isSelectionAction v="true" /> <iconId>NEON:IMPORT</iconId> <stateProcess>%aditoprj%/entity/Organisation_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/stateProcess.js</stateProcess> @@ -1062,6 +1064,8 @@ <name>IntegrateCurrentIntoSelectedAction</name> <title>Integrate current into selected contact</title> <onActionProcess>%aditoprj%/entity/Organisation_entity/entityfields/duplicateactions/children/integratecurrentintoselectedaction/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> + <isObjectAction v="false" /> <isSelectionAction v="true" /> <iconId>NEON:EXPORT</iconId> <stateProcess>%aditoprj%/entity/Organisation_entity/entityfields/duplicateactions/children/integratecurrentintoselectedaction/stateProcess.js</stateProcess> @@ -1070,6 +1074,8 @@ <name>IgnoreDuplicate</name> <title>Ignore Duplicate</title> <onActionProcess>%aditoprj%/entity/Organisation_entity/entityfields/duplicateactions/children/ignoreduplicate/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> + <isObjectAction v="false" /> <isSelectionAction v="true" /> <iconId>VAADIN:CLOSE</iconId> <stateProcess>%aditoprj%/entity/Organisation_entity/entityfields/duplicateactions/children/ignoreduplicate/stateProcess.js</stateProcess> @@ -1078,6 +1084,7 @@ <name>IgnoreWholeCluster</name> <title>Ignore whole Cluster</title> <onActionProcess>%aditoprj%/entity/Organisation_entity/entityfields/duplicateactions/children/ignorewholecluster/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> <iconId>VAADIN:CLOSE</iconId> <stateProcess>%aditoprj%/entity/Organisation_entity/entityfields/duplicateactions/children/ignorewholecluster/stateProcess.js</stateProcess> </entityActionField> @@ -1094,11 +1101,6 @@ </entityParameter> <entityConsumer> <name>SelfDuplicatesUncached</name> - <dependency> - <name>dependency</name> - <entityName>Organisation_entity</entityName> - <fieldName>SelfDuplicates</fieldName> - </dependency> <children> <entityParameter> <name>DuplicateActionsControl_param</name> @@ -1118,20 +1120,25 @@ <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/selfduplicatesuncached/children/excludedcontactids_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>CommRestrictions</name> <dependency> <name>dependency</name> - <entityName>CommRestriction_Entity</entityName> - <fieldName>CommRestrictions</fieldName> + <entityName>Organisation_entity</entityName> + <fieldName>SelfDuplicates</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>CommRestrictions</name> <children> <entityParameter> <name>ContactId_param</name> <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/commrestrictions/children/contactid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>CommRestriction_Entity</entityName> + <fieldName>CommRestrictions</fieldName> + </dependency> </entityConsumer> <entityField> <name>COMMRESTRICTIONS_ACTIVE</name> @@ -1186,11 +1193,6 @@ <entityConsumer> <name>Classifications</name> <refreshParent v="true" /> - <dependency> - <name>dependency</name> - <entityName>Classification_entity</entityName> - <fieldName>Classifications</fieldName> - </dependency> <children> <entityParameter> <name>ClassificationType_param</name> @@ -1208,6 +1210,11 @@ <expose v="true" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Classification_entity</entityName> + <fieldName>Classifications</fieldName> + </dependency> </entityConsumer> <entityField> <name>COUNT</name> @@ -1228,14 +1235,6 @@ <name>OrganisationsViaIndex</name> <documentation>%aditoprj%/entity/Organisation_entity/entityfields/organisationsviaindex/documentation.adoc</documentation> <recordContainer>index</recordContainer> - <dependencies> - <entityDependency> - <name>e60b8983-166d-4280-a1a5-f990ad77eeb9</name> - <entityName>AroundLocation_entity</entityName> - <fieldName>Organisations</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>ExcludeOrganisationsByPersonId</name> @@ -1278,6 +1277,14 @@ <expose v="true" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>e60b8983-166d-4280-a1a5-f990ad77eeb9</name> + <entityName>AroundLocation_entity</entityName> + <fieldName>Organisations</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityActionField> <name>openAroundLocation</name> @@ -1348,17 +1355,17 @@ </entityProvider> <entityConsumer> <name>DistrictResponsibles</name> - <dependency> - <name>dependency</name> - <entityName>DistrictResponsible_entity</entityName> - <fieldName>OrganisationResponsibles</fieldName> - </dependency> <children> <entityParameter> <name>OrgUid_param</name> <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/districtresponsibles/children/orguid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>DistrictResponsible_entity</entityName> + <fieldName>OrganisationResponsibles</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>FilterPreSet_param</name> @@ -1367,14 +1374,6 @@ <entityProvider> <name>NonselfDuplicates</name> <documentation>%aditoprj%/entity/Organisation_entity/entityfields/nonselfduplicates/documentation.adoc</documentation> - <dependencies> - <entityDependency> - <name>2e410b9e-5ebc-48ea-9562-da386202d7e8</name> - <entityName>Duplicates_entity</entityName> - <fieldName>DuplicateOrganisationsConsumer</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>AttributeKeyId_param</name> @@ -1397,6 +1396,14 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>2e410b9e-5ebc-48ea-9562-da386202d7e8</name> + <entityName>Duplicates_entity</entityName> + <fieldName>DuplicateOrganisationsConsumer</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityActionGroup> <name>orgReportDispatch</name> @@ -1413,11 +1420,6 @@ </entityActionGroup> <entityConsumer> <name>AttributesFilter</name> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>FilterProvider</fieldName> - </dependency> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -1428,6 +1430,11 @@ <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/attributesfilter/children/objecttype_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>FilterProvider</fieldName> + </dependency> </entityConsumer> </entityFields> <recordContainers> diff --git a/entity/Organisation_entity/contentDescriptionProcess.js b/entity/Organisation_entity/contentDescriptionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b07a72fe7cc543e3bedc5d5604f12f28769ffb6b --- /dev/null +++ b/entity/Organisation_entity/contentDescriptionProcess.js @@ -0,0 +1,5 @@ +import("system.translate"); +import("system.datetime"); +import("system.vars"); +import("system.result"); +result.string(datetime.toDate(vars.get("$field.DATE_NEW"), translate.text("dd.MM.yyyy"))); \ No newline at end of file diff --git a/entity/Organisation_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/onActionProcess.js b/entity/Organisation_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/onActionProcess.js index 1f3a9e3ddfca04ca5911fd70b734115ff1f60291..6bb5f4cde7193d3a4171b6d613cbfb0bfee097c8 100644 --- a/entity/Organisation_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/onActionProcess.js +++ b/entity/Organisation_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/onActionProcess.js @@ -16,5 +16,8 @@ if(mergeSuccess) if(currentContactId == null) currentContactId = ""; DuplicateScannerUtils.createMergeSuccessActivity(sourceContactId, targetContactId, currentContactId, "Organisation"); - neon.refreshAll(); + //neon.refresh() with no fields will refresh the current image (and all sub images) but NOT the preview. neon.refreshAll() would refresh both, + //why it would lead to an error because it's trying to load the already opened preview of the duplicateContact which just got deleted + //and does not exist any more which results in an exception + neon.refresh(); } \ 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 7ef4fdefa4f6e4dcb25f9b97086b5a1e943e0dda..a38a50972c05d3a71887d352e767a4413d5398bb 100644 --- a/entity/Organisation_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Organisation_entity/recordcontainers/db/conditionProcess.js @@ -55,5 +55,4 @@ if (vars.exists("$param.OnlyOwnSupervised_param") && vars.get("$param.OnlyOwnSup SqlBuilder.EXISTS() ); } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Organisation_entity/recordcontainers/db/onDBInsert.js b/entity/Organisation_entity/recordcontainers/db/onDBInsert.js index 434601a60b8df854ee2910909a9c22d187266dd9..87c54eb133ade2f232b31f1ef23e47e3053e1f7f 100644 --- a/entity/Organisation_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Organisation_entity/recordcontainers/db/onDBInsert.js @@ -1,13 +1,9 @@ import("system.vars"); -import("Classification_lib"); import("Workflow_lib"); - var uid = vars.get("$sys.uid"); var contextname = vars.get("$sys.currentcontextname"); -ClassificationUtils.insertEmptyClassification(uid, contextname); - //start the execution in afterOperatingState, because here the dataset is not yet inserted vars.set("$context.workflowQueue", {}); WorkflowSignalSender.inserted(); \ No newline at end of file diff --git a/entity/Organisation_entity/recordcontainers/index/query.js b/entity/Organisation_entity/recordcontainers/index/query.js index ee0f4bb6cea37016e4a159e5b65aac515a7991ad..e26250598edb296c39f96f355d82fae6f096a7df 100644 --- a/entity/Organisation_entity/recordcontainers/index/query.js +++ b/entity/Organisation_entity/recordcontainers/index/query.js @@ -39,7 +39,7 @@ var querySelect = newSelect([ "ADDRESS.CITY", "standardEmail.ADDR", "standardPhone.ADDR", - sqlHelper.conconcatWithSeparatorcat([sqlHelper.concatWithSeparator(["standardAddress.ADDRESS", "standardAddress.BUILDINGNO"]) + sqlHelper.concatWithSeparator([sqlHelper.concatWithSeparator(["standardAddress.ADDRESS", "standardAddress.BUILDINGNO"]) ,sqlHelper.concatWithSeparator(["standardAddress.COUNTRY", "standardAddress.ZIP", "standardAddress.CITY"]) ], " - ") ]) diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index b642f05df01a6cbb7c96e552fd6e5c3508cc3671..ccb951171b001f5b1ed08cf8daa5368ae64d7990 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -62,6 +62,7 @@ <title>Salutation</title> <consumer>Salutations</consumer> <mandatory v="true" /> + <displayValueProcess>%aditoprj%/entity/Person_entity/entityfields/salutation/displayValueProcess.js</displayValueProcess> </entityField> <entityField> <name>TITLE</name> @@ -89,11 +90,6 @@ </entityFieldGroup> <entityConsumer> <name>Activities</name> - <dependency> - <name>dependency</name> - <entityName>Activity_entity</entityName> - <fieldName>LinkedObjects</fieldName> - </dependency> <children> <entityParameter> <name>RowId_param</name> @@ -108,6 +104,11 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/activities/children/presetlinks_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Activity_entity</entityName> + <fieldName>LinkedObjects</fieldName> + </dependency> </entityConsumer> <entityField> <name>CONTACTID</name> @@ -118,14 +119,6 @@ <name>OrganisationRelated</name> <documentation>%aditoprj%/entity/Person_entity/entityfields/organisationrelated/documentation.adoc</documentation> <recordContainer>db</recordContainer> - <dependencies> - <entityDependency> - <name>41952879-c2f0-411f-8ca1-36c38914a629</name> - <entityName>Organisation_entity</entityName> - <fieldName>Contact</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>ContactId_param</name> @@ -144,6 +137,14 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>41952879-c2f0-411f-8ca1-36c38914a629</name> + <entityName>Organisation_entity</entityName> + <fieldName>Contact</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityField> <name>PERSON_ID</name> @@ -161,11 +162,6 @@ </entityField> <entityConsumer> <name>PersAddresses</name> - <dependency> - <name>dependency</name> - <entityName>Address_entity</entityName> - <fieldName>ContactAddresses</fieldName> - </dependency> <children> <entityParameter> <name>DefaultAddressId_param</name> @@ -185,14 +181,14 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/persaddresses/children/replacestandardaddress_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>Communications</name> <dependency> <name>dependency</name> - <entityName>Communication_entity</entityName> - <fieldName>AllCommunications</fieldName> + <entityName>Address_entity</entityName> + <fieldName>ContactAddresses</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>Communications</name> <children> <entityParameter> <name>ContactId_param</name> @@ -210,29 +206,29 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/communications/children/contactsmaincountry_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Communication_entity</entityName> + <fieldName>AllCommunications</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Organisations</name> <selectionMode>SINGLE</selectionMode> - <dependency> - <name>dependency</name> - <entityName>Organisation_entity</entityName> - <fieldName>WithPersonIdFilter</fieldName> - </dependency> <children> <entityParameter> <name>ExcludeOrganisationsByPersonId</name> <valueProcess>%aditoprj%/entity/Person_entity/entityfields/organisations/children/excludeorganisationsbypersonid/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>Contracts</name> <dependency> <name>dependency</name> - <entityName>Contract_entity</entityName> - <fieldName>Contracts</fieldName> + <entityName>Organisation_entity</entityName> + <fieldName>WithPersonIdFilter</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>Contracts</name> <children> <entityParameter> <name>ContactId_param</name> @@ -241,16 +237,16 @@ <mandatory v="true" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Contract_entity</entityName> + <fieldName>Contracts</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Pricelists</name> <state>AUTO</state> <stateProcess>%aditoprj%/entity/Person_entity/entityfields/pricelists/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>Productprice_entity</entityName> - <fieldName>Productprices</fieldName> - </dependency> <children> <entityParameter> <name>ContactId_param</name> @@ -259,6 +255,11 @@ <mandatory v="true" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Productprice_entity</entityName> + <fieldName>Productprices</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Genders</name> @@ -313,11 +314,6 @@ <entityConsumer> <name>Documents</name> <selectionMode>MULTI</selectionMode> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>Documents</fieldName> - </dependency> <children> <entityParameter> <name>AssignmentRowId_param</name> @@ -332,6 +328,11 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/documents/children/disallowcreate_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>Documents</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>ContactId_param</name> @@ -356,14 +357,6 @@ <name>Contact</name> <documentation>%aditoprj%/entity/Person_entity/entityfields/contact/documentation.adoc</documentation> <recordContainer>db</recordContainer> - <dependencies> - <entityDependency> - <name>f925c8e6-b096-4093-bd39-c9cd30a6a71a</name> - <entityName>Lead_entity</entityName> - <fieldName>ContactId</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>OrgId_param</name> @@ -391,16 +384,19 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>f925c8e6-b096-4093-bd39-c9cd30a6a71a</name> + <entityName>Lead_entity</entityName> + <fieldName>ContactId</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityConsumer> <name>OrgAddresses</name> <state>READONLY</state> <stateProcess>%aditoprj%/entity/Person_entity/entityfields/orgaddresses/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>Address_entity</entityName> - <fieldName>OrganisationAddressesByContact</fieldName> - </dependency> <children> <entityParameter> <name>ContactId_param</name> @@ -412,6 +408,11 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/orgaddresses/children/defaultaddressid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Address_entity</entityName> + <fieldName>OrganisationAddressesByContact</fieldName> + </dependency> </entityConsumer> <entityField> <name>STANDARD_EMAIL_COMMUNICATION</name> @@ -428,11 +429,6 @@ <entityConsumer> <name>PhoneCommunications</name> <description>Used for standard communication</description> - <dependency> - <name>dependency</name> - <entityName>Communication_entity</entityName> - <fieldName>PhoneCommunications</fieldName> - </dependency> <children> <entityParameter> <name>ContactId_param</name> @@ -442,15 +438,15 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact or creating a new entry that is related to a contact.</description> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>EmailCommunications</name> - <description>Used for standard communication</description> <dependency> <name>dependency</name> <entityName>Communication_entity</entityName> - <fieldName>EmailCommunications</fieldName> + <fieldName>PhoneCommunications</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>EmailCommunications</name> + <description>Used for standard communication</description> <children> <entityParameter> <name>ContactId_param</name> @@ -460,6 +456,11 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact or creating a new entry that is related to a contact.</description> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Communication_entity</entityName> + <fieldName>EmailCommunications</fieldName> + </dependency> </entityConsumer> <entityField> <name>ADDRESS_ID</name> @@ -471,11 +472,6 @@ </entityField> <entityConsumer> <name>KeywordGenders</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> @@ -483,6 +479,11 @@ <expose v="false" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Languages</name> @@ -494,40 +495,35 @@ </entityConsumer> <entityConsumer> <name>Offers</name> - <dependency> - <name>dependency</name> - <entityName>Offer_entity</entityName> - <fieldName>ContactOffers</fieldName> - </dependency> <children> <entityParameter> <name>ContactId_param</name> <valueProcess>%aditoprj%/entity/Person_entity/entityfields/offers/children/contactid_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>Salutations</name> <dependency> <name>dependency</name> - <entityName>SalutationDistinct_entity</entityName> - <fieldName>Salutations</fieldName> + <entityName>Offer_entity</entityName> + <fieldName>ContactOffers</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>Salutations</name> <children> <entityParameter> <name>Language_param</name> <valueProcess>%aditoprj%/entity/Person_entity/entityfields/salutations/children/language_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>SalutationDistinct_entity</entityName> + <fieldName>Salutations</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Attributes</name> <onValidation>%aditoprj%/entity/Person_entity/entityfields/attributes/onValidation.js</onValidation> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>AttributeRelations</fieldName> - </dependency> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -542,14 +538,14 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/attributes/children/showdsgvomessage_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>SalutationTitles</name> <dependency> <name>dependency</name> - <entityName>SalutationTitleDistinct_entity</entityName> - <fieldName>SalutationTitles</fieldName> + <entityName>AttributeRelation_entity</entityName> + <fieldName>AttributeRelations</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>SalutationTitles</name> <children> <entityParameter> <name>Salutation_param</name> @@ -560,15 +556,15 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/salutationtitles/children/language_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>SalutationTitleDistinct_entity</entityName> + <fieldName>SalutationTitles</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Tasks</name> <state>EDITABLE</state> - <dependency> - <name>dependency</name> - <entityName>Task_entity</entityName> - <fieldName>Tasks</fieldName> - </dependency> <children> <entityParameter> <name>RowId_param</name> @@ -583,14 +579,14 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/tasks/children/presetlinks_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>ObjectTrees</name> <dependency> <name>dependency</name> - <entityName>ObjectTree_entity</entityName> - <fieldName>TreeProvider</fieldName> + <entityName>Task_entity</entityName> + <fieldName>Tasks</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>ObjectTrees</name> <children> <entityParameter> <name>ObjectIds_param</name> @@ -601,6 +597,11 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/objecttrees/children/objecttypes_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>ObjectTree_entity</entityName> + <fieldName>TreeProvider</fieldName> + </dependency> </entityConsumer> <entityField> <name>STATUS</name> @@ -612,25 +613,20 @@ </entityField> <entityConsumer> <name>KeywordContactStates</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Person_entity/entityfields/keywordcontactstates/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>ContactAndOrganisationAddresses</name> <dependency> <name>dependency</name> - <entityName>Address_entity</entityName> - <fieldName>OrganisationAndContactAddresses</fieldName> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>ContactAndOrganisationAddresses</name> <children> <entityParameter> <name>ContactId_param</name> @@ -641,6 +637,11 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/contactandorganisationaddresses/children/organisationid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Address_entity</entityName> + <fieldName>OrganisationAndContactAddresses</fieldName> + </dependency> </entityConsumer> <entityField> <name>DEPARTMENT</name> @@ -663,11 +664,6 @@ </entityField> <entityConsumer> <name>LogHistories</name> - <dependency> - <name>dependency</name> - <entityName>LogHistory_entity</entityName> - <fieldName>LogHistoryProvider</fieldName> - </dependency> <children> <entityParameter> <name>tablenames_param</name> @@ -676,14 +672,14 @@ <mandatory v="true" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>OtherContacts</name> <dependency> <name>dependency</name> - <entityName>Contact_entity</entityName> - <fieldName>PersonsContactsExceptOwn</fieldName> + <entityName>LogHistory_entity</entityName> + <fieldName>LogHistoryProvider</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>OtherContacts</name> <children> <entityParameter> <name>OwnContactId_param</name> @@ -694,6 +690,11 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/othercontacts/children/languagekey_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Contact_entity</entityName> + <fieldName>PersonsContactsExceptOwn</fieldName> + </dependency> </entityConsumer> <entityField> <name>ORGANISATION_NAME</name> @@ -706,20 +707,6 @@ <entityProvider> <name>Contacts</name> <documentation>%aditoprj%/entity/Person_entity/entityfields/contacts/documentation.adoc</documentation> - <dependencies> - <entityDependency> - <name>c98da62f-d6b2-4ddb-9101-92e9a60abdfb</name> - <entityName>VisitPlanEmployeeWeek_entity</entityName> - <fieldName>Persons</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>f56b1378-138d-4f88-b9df-274adce9f90c</name> - <entityName>VisitPlanEntry_entity</entityName> - <fieldName>Persons</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>ContactId_param</name> @@ -746,14 +733,23 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>c98da62f-d6b2-4ddb-9101-92e9a60abdfb</name> + <entityName>VisitPlanEmployeeWeek_entity</entityName> + <fieldName>Persons</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>f56b1378-138d-4f88-b9df-274adce9f90c</name> + <entityName>VisitPlanEntry_entity</entityName> + <fieldName>Persons</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityConsumer> <name>360DegreeObjects</name> - <dependency> - <name>dependency</name> - <entityName>360Degree_entity</entityName> - <fieldName>PersonObjects</fieldName> - </dependency> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -764,14 +760,14 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/360degreeobjects/children/objectstatus_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>AttributeTree</name> <dependency> <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>TreeProvider</fieldName> + <entityName>360Degree_entity</entityName> + <fieldName>PersonObjects</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>AttributeTree</name> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -786,6 +782,11 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/attributetree/children/showdsgvomessage_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>TreeProvider</fieldName> + </dependency> </entityConsumer> <entityField> <name>DATE_NEW</name> @@ -845,40 +846,35 @@ </entityParameter> <entityConsumer> <name>CommRestrictions</name> - <dependency> - <name>dependency</name> - <entityName>CommRestriction_Entity</entityName> - <fieldName>CommRestrictions</fieldName> - </dependency> <children> <entityParameter> <name>ContactId_param</name> <valueProcess>%aditoprj%/entity/Person_entity/entityfields/commrestrictions/children/contactid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>CommRestriction_Entity</entityName> + <fieldName>CommRestrictions</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>DSGVOEntries</name> <stateProcess>%aditoprj%/entity/Person_entity/entityfields/dsgvoentries/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>DSGVO_entity</entityName> - <fieldName>#PROVIDER</fieldName> - </dependency> <children> <entityParameter> <name>ContactId_param</name> <valueProcess>%aditoprj%/entity/Person_entity/entityfields/dsgvoentries/children/contactid_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>Appointments</name> <dependency> <name>dependency</name> - <entityName>Appointment_entity</entityName> - <fieldName>LinkedAppointments</fieldName> + <entityName>DSGVO_entity</entityName> + <fieldName>#PROVIDER</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>Appointments</name> <children> <entityParameter> <name>LinkedObjectId_param</name> @@ -889,6 +885,11 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/appointments/children/erroronpermissiondenied/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Appointment_entity</entityName> + <fieldName>LinkedAppointments</fieldName> + </dependency> </entityConsumer> <entityField> <name>OpenTasks</name> @@ -925,11 +926,6 @@ </entityField> <entityConsumer> <name>SelfDuplicatesUncached</name> - <dependency> - <name>dependency</name> - <entityName>Person_entity</entityName> - <fieldName>SelfDuplicates</fieldName> - </dependency> <children> <entityParameter> <name>DuplicateActionsControl_param</name> @@ -948,6 +944,11 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/selfduplicatesuncached/children/excludedcontactids_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Person_entity</entityName> + <fieldName>SelfDuplicates</fieldName> + </dependency> </entityConsumer> <entityField> <name>LEAD_LEADID</name> @@ -978,14 +979,6 @@ <name>QuickEntryContacts</name> <documentation>%aditoprj%/entity/Person_entity/entityfields/quickentrycontacts/documentation.adoc</documentation> <titlePlural>Additional Contacts</titlePlural> - <dependencies> - <entityDependency> - <name>6d137850-63ba-4be0-9ca5-1464e71d4f77</name> - <entityName>QuickEntry_entity</entityName> - <fieldName>Contacts</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>ContactId_param</name> @@ -1008,6 +1001,14 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>6d137850-63ba-4be0-9ca5-1464e71d4f77</name> + <entityName>QuickEntry_entity</entityName> + <fieldName>Contacts</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityActionField> <name>openEditDefaultsView</name> @@ -1120,6 +1121,8 @@ <name>IntegrateSelectedIntoCurrentAction</name> <title>Integrate selected into current contact</title> <onActionProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> + <isObjectAction v="false" /> <isSelectionAction v="true" /> <iconId>NEON:IMPORT</iconId> <stateProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/stateProcess.js</stateProcess> @@ -1128,6 +1131,8 @@ <name>IntegrateCurrentIntoSelectedAction</name> <title>Integrate current into selected contact</title> <onActionProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/integratecurrentintoselectedaction/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> + <isObjectAction v="false" /> <isSelectionAction v="true" /> <iconId>NEON:EXPORT</iconId> <stateProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/integratecurrentintoselectedaction/stateProcess.js</stateProcess> @@ -1136,6 +1141,8 @@ <name>IgnoreDuplicate</name> <title>Ignore Duplicate</title> <onActionProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/ignoreduplicate/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> + <isObjectAction v="false" /> <isSelectionAction v="true" /> <iconId>VAADIN:CLOSE</iconId> <stateProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/ignoreduplicate/stateProcess.js</stateProcess> @@ -1144,6 +1151,7 @@ <name>IgnoreWholeCluster</name> <title>Ignore whole cluster</title> <onActionProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/ignorewholecluster/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> <iconId>VAADIN:CLOSE</iconId> <stateProcess>%aditoprj%/entity/Person_entity/entityfields/duplicateactions/children/ignorewholecluster/stateProcess.js</stateProcess> </entityActionField> @@ -1254,14 +1262,6 @@ <entityProvider> <name>IdFilteredActiveContacts</name> <documentation>%aditoprj%/entity/Person_entity/entityfields/idfilteredactivecontacts/documentation.adoc</documentation> - <dependencies> - <entityDependency> - <name>511f3e4c-7493-4a31-a136-0ba80ba2ec85</name> - <entityName>Member_entity</entityName> - <fieldName>Contacts</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>ExcludedContactIds_param</name> @@ -1296,6 +1296,14 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>511f3e4c-7493-4a31-a136-0ba80ba2ec85</name> + <entityName>Member_entity</entityName> + <fieldName>Contacts</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityField> <name>COUNT</name> @@ -1330,29 +1338,21 @@ <name>Districts</name> <state>INVISIBLE</state> <stateProcess>%aditoprj%/entity/Person_entity/entityfields/districts/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>District_entity</entityName> - <fieldName>ResponsibleDistricts</fieldName> - </dependency> <children> <entityParameter> <name>DistrictsByContactId_param</name> <valueProcess>%aditoprj%/entity/Person_entity/entityfields/districts/children/districtsbycontactid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>District_entity</entityName> + <fieldName>ResponsibleDistricts</fieldName> + </dependency> </entityConsumer> <entityProvider> <name>NonselfDuplicates</name> <documentation>%aditoprj%/entity/Person_entity/entityfields/nonselfduplicates/documentation.adoc</documentation> - <dependencies> - <entityDependency> - <name>3a4352e2-9686-4c52-9d01-dbfad8c68ea7</name> - <entityName>Duplicates_entity</entityName> - <fieldName>DuplicatePersonsConsumer</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>ContactId_param</name> @@ -1375,22 +1375,45 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>3a4352e2-9686-4c52-9d01-dbfad8c68ea7</name> + <entityName>Duplicates_entity</entityName> + <fieldName>DuplicatePersonsConsumer</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityConsumer> <name>DistrictResponsibles</name> <state>INVISIBLE</state> <stateProcess>%aditoprj%/entity/Person_entity/entityfields/districtresponsibles/stateProcess.js</stateProcess> + <children> + <entityParameter> + <name>OrgUid_param</name> + <valueProcess>%aditoprj%/entity/Person_entity/entityfields/districtresponsibles/children/orguid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> <dependency> <name>dependency</name> <entityName>DistrictResponsible_entity</entityName> <fieldName>OrganisationResponsibles</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>Orders</name> + <documentation>%aditoprj%/entity/Person_entity/entityfields/orders/documentation.adoc</documentation> <children> <entityParameter> - <name>OrgUid_param</name> - <valueProcess>%aditoprj%/entity/Person_entity/entityfields/districtresponsibles/children/orguid_param/valueProcess.js</valueProcess> + <name>ContactId_param</name> + <valueProcess>%aditoprj%/entity/Person_entity/entityfields/orders/children/contactid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Order_entity</entityName> + <fieldName>#PROVIDER</fieldName> + </dependency> </entityConsumer> </entityFields> <recordContainers> diff --git a/entity/Person_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/onActionProcess.js b/entity/Person_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/onActionProcess.js index 2930a65370d53abee83d106cae30b08daf67146d..6a9f2ac39a7238d7dd5fbaec53e41c57eabec241 100644 --- a/entity/Person_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/onActionProcess.js +++ b/entity/Person_entity/entityfields/duplicateactions/children/integrateselectedintocurrentaction/onActionProcess.js @@ -26,7 +26,8 @@ if(mergeSuccess) if(currentContactId == null) currentContactId = ""; DuplicateScannerUtils.createMergeSuccessActivity(sourceContactId, targetContactId, currentContactId, "Person"); -// openContext due to the fact, that openContext will lead to an error 'due'cause it's trying to load the already opened preview -// of the duplicateContact which just got deleted = nullpointException - neon.openContext("Person", null, [targetContactId], neon.OPERATINGSTATE_VIEW, null, null); + //neon.refresh() with no fields will refresh the current image (and all sub images) but NOT the preview. neon.refreshAll() would refresh both, + //why it would lead to an error because it's trying to load the already opened preview of the duplicateContact which just got deleted + //and does not exist any more which results in an exception + neon.refresh(); } \ No newline at end of file diff --git a/entity/Person_entity/entityfields/orders/children/contactid_param/valueProcess.js b/entity/Person_entity/entityfields/orders/children/contactid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7b6137b4d105e9ba592cf8ef6e796fb838a32b09 --- /dev/null +++ b/entity/Person_entity/entityfields/orders/children/contactid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.CONTACTID")); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/orders/documentation.adoc b/entity/Person_entity/entityfields/orders/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..cadb57b42a557960231861bfd0aa547cd54677f4 --- /dev/null +++ b/entity/Person_entity/entityfields/orders/documentation.adoc @@ -0,0 +1 @@ +Consumer for loading a contacts related Orders. This is for example used to verify if the Person-row can be deleted. \ No newline at end of file diff --git a/entity/Person_entity/entityfields/salutation/displayValueProcess.js b/entity/Person_entity/entityfields/salutation/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..275e5fb9a51310d5d2b8e0d427aec3415a2b6c73 --- /dev/null +++ b/entity/Person_entity/entityfields/salutation/displayValueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); + +if(vars.get("$field.SALUTATION")) + result.string(vars.get("$field.SALUTATION")); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/testgroup/children/addrecordaction/onActionProcess.js b/entity/Person_entity/entityfields/testgroup/children/addrecordaction/onActionProcess.js deleted file mode 100644 index 2161e0ef8ccff3d14d82c6e75b4b9c6ecce35a3d..0000000000000000000000000000000000000000 --- a/entity/Person_entity/entityfields/testgroup/children/addrecordaction/onActionProcess.js +++ /dev/null @@ -1,7 +0,0 @@ -import("system.neon"); - -var test = { - "AddressSearch" : "response.address" - }; - -neon.addRecord("Documents", test) \ No newline at end of file diff --git a/entity/Person_entity/entityfields/title/displayValueProcess.js b/entity/Person_entity/entityfields/title/displayValueProcess.js index 3682b56b29c28eb54083e5d08025f851591aed2c..9023d1aa7e54c97980047d0aed8f9fdc50e1b157 100644 --- a/entity/Person_entity/entityfields/title/displayValueProcess.js +++ b/entity/Person_entity/entityfields/title/displayValueProcess.js @@ -1,9 +1,5 @@ import("system.result"); -import("system.neon"); import("system.vars"); -if((vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)) -{ - if (!vars.get("$field.TITLE")) - result.string("") -} \ No newline at end of file +if (vars.get("$field.TITLE")) + result.string(vars.get("$field.TITLE")); diff --git a/entity/Person_entity/grantDeleteProcess.js b/entity/Person_entity/grantDeleteProcess.js index 876b00bdb6a168033f3c0e5bfc587b8fff02a973..36866c88c8b760c3a8e009714d49ebfb2c9674f3 100644 --- a/entity/Person_entity/grantDeleteProcess.js +++ b/entity/Person_entity/grantDeleteProcess.js @@ -29,7 +29,7 @@ if(personCount == 1) .andNoEntityRows("Contract_entity", "Contracts", {ContactId_param : contactId}) //Contracts .andNoEntityRows("ObjectTree_entity", "TreeProvider", {ObjectIds_param : JSON.stringify([contactId, vars.get("$field.PERSON_ID")]), ObjectTypes_param : JSON.stringify([currentContext, "PrivatePerson"])}) .andNoEntityRows("CampaignParticipant_entity", "CampaignParticipantsProvider", {ContactId_param : contactId}) - .andNoEntityRows("Order_entity", "OrderProvider", {ContactId_param : contactId}) + .andNoEntityRows("Order_entity", "#PROVIDER", {ContactId_param : contactId}) .validate(); } else if (personCount == 0) //special case in QuickEntry where it should be possible to remove a new Person that is not saved in the db yet diff --git a/entity/Person_entity/recordcontainers/db/conditionProcess.js b/entity/Person_entity/recordcontainers/db/conditionProcess.js index 04f984cbc56a2705edaf17cc7f00819a4d4526e9..338811158360900835c45a56b055904518f65ed6 100644 --- a/entity/Person_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Person_entity/recordcontainers/db/conditionProcess.js @@ -41,5 +41,4 @@ if (vars.exists("$param.OnlyOwnSupervised_param") && vars.get("$param.OnlyOwnSup ); } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/PrivatePerson_entity/recordcontainers/db/conditionProcess.js b/entity/PrivatePerson_entity/recordcontainers/db/conditionProcess.js index d7230024504ab503e79b5b4c306b41c2a4c3d35e..69206e0479d58423e19c04113145f595ada8bd87 100644 --- a/entity/PrivatePerson_entity/recordcontainers/db/conditionProcess.js +++ b/entity/PrivatePerson_entity/recordcontainers/db/conditionProcess.js @@ -11,5 +11,4 @@ if (vars.get("$param.ExcludedPersonIds_param")) cond.andIfSet("PERSON.PERSONID", excludedPersons, SqlBuilder.NOT_IN()); } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Prod2prod_entity/entityfields/products/children/excludedproducts_param/valueProcess.js b/entity/Prod2prod_entity/entityfields/products/children/excludedproducts_param/valueProcess.js index bbca20492052f0f34e6997a999c968dca4ab821e..ca417dc781a55e926604703a6d21915be43e0af3 100644 --- a/entity/Prod2prod_entity/entityfields/products/children/excludedproducts_param/valueProcess.js +++ b/entity/Prod2prod_entity/entityfields/products/children/excludedproducts_param/valueProcess.js @@ -31,7 +31,6 @@ else result.object(excludeIDs); -// TODO: remove code duplication, better param naming and using SqlBuilder function _getParentID(pID, pIDs) { //Ermitteln welche Produkte ausgeschlossen werden müssen. diff --git a/entity/Product_entity/Product_entity.aod b/entity/Product_entity/Product_entity.aod index 2a6662b6f7d6e80914a53eddd2bdf2b74607ffa4..b548703631233c53beb2d62af55e3a81912e5882 100644 --- a/entity/Product_entity/Product_entity.aod +++ b/entity/Product_entity/Product_entity.aod @@ -9,6 +9,7 @@ </siblings> <grantDeleteProcess>%aditoprj%/entity/Product_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/Product_entity/contentTitleProcess.js</contentTitleProcess> + <contentDescriptionProcess>%aditoprj%/entity/Product_entity/contentDescriptionProcess.js</contentDescriptionProcess> <afterUiInit>%aditoprj%/entity/Product_entity/afterUiInit.js</afterUiInit> <useFavorites v="true" /> <iconId>VAADIN:HAMMER</iconId> diff --git a/entity/Product_entity/contentDescriptionProcess.js b/entity/Product_entity/contentDescriptionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b07a72fe7cc543e3bedc5d5604f12f28769ffb6b --- /dev/null +++ b/entity/Product_entity/contentDescriptionProcess.js @@ -0,0 +1,5 @@ +import("system.translate"); +import("system.datetime"); +import("system.vars"); +import("system.result"); +result.string(datetime.toDate(vars.get("$field.DATE_NEW"), translate.text("dd.MM.yyyy"))); \ No newline at end of file diff --git a/entity/Product_entity/entityfields/contact_id/displayValueProcess.js b/entity/Product_entity/entityfields/contact_id/displayValueProcess.js index 660715572aed4cf5db65f233b769c2c9ffa2bdf4..d29e2e1026670cc941752ee8c806c0fa4d730465 100644 --- a/entity/Product_entity/entityfields/contact_id/displayValueProcess.js +++ b/entity/Product_entity/entityfields/contact_id/displayValueProcess.js @@ -3,4 +3,4 @@ import("system.vars"); import("system.result"); import("Context_lib"); -result.string(db.cell(ContextUtils.getNameSql("Organisation", vars.get("$field.CONTACT_ID")))); \ No newline at end of file +result.string(ContextUtils.getTitleByContext("Organisation", vars.get("$field.CONTACT_ID"))); \ No newline at end of file diff --git a/entity/Product_entity/recordcontainers/db/conditionProcess.js b/entity/Product_entity/recordcontainers/db/conditionProcess.js index 3602fca8eb08a457b21fdd77bfd58ab4f43be1d3..d2f79f17d279ce0c07f88dab88f93455d1ffe5bb 100644 --- a/entity/Product_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Product_entity/recordcontainers/db/conditionProcess.js @@ -11,5 +11,4 @@ if (vars.exists("$param.ExcludedProducts_param") && vars.get("$param.ExcludedPro productCond.andIfSet("PRODUCT.PRODUCTID", excludedIds, SqlBuilder.NOT_IN()); } -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(productCond.toString()); \ No newline at end of file diff --git a/entity/Productprice_entity/recordcontainers/db/conditionProcess.js b/entity/Productprice_entity/recordcontainers/db/conditionProcess.js index a68cf9891b46dc2d7e584e8f64da30aa40bf8543..869e14a88e9e1d32ca76dc75de6262413477ccb5 100644 --- a/entity/Productprice_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Productprice_entity/recordcontainers/db/conditionProcess.js @@ -5,5 +5,4 @@ var cond = newWhere() .andIfSet("PRODUCTPRICE.PRODUCT_ID", "$param.ProductId_param") .andIfSet("PRODUCTPRICE.CONTACT_ID", "$param.ContactId_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/RoleChildren_entity/recordcontainers/jdito/contentProcess.js b/entity/RoleChildren_entity/recordcontainers/jdito/contentProcess.js index a76ad51dc5d86201281871b40f73bcd967bf8c44..9a225fe5bc38edbdec6a301f5a51f87e68e2a7dc 100644 --- a/entity/RoleChildren_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/RoleChildren_entity/recordcontainers/jdito/contentProcess.js @@ -4,6 +4,8 @@ import("system.db"); import("system.vars"); import("system.result"); import("system.util"); +import("Permission_lib"); +import("system.logging"); var alias = SqlUtils.getSystemAlias(); var selectedRoleName = vars.exists("$param.RoleId_param") && vars.get("$param.RoleId_param"); @@ -17,10 +19,7 @@ if (selectedRoleType == "" && selectedRoleName != "") { // roles can only be assigned to CUSTOM roles -> selected role has to be a viable CUSTOM role if (selectedRoleName && selectedRoleType == "CUSTOM") { - var childRoles = newSelect("ID, CHILD_ROLE", alias) - .from("ASYS_ROLES_CHILDREN") - .where("ASYS_ROLES_CHILDREN.PARENT_ROLE", selectedRoleName) - .table(); + var childRoles = PermissionUtil.getChildRoles(selectedRoleName); for each (let childRole in childRoles) { children.push([childRole[0], childRole[1], selectedRoleName]); diff --git a/entity/Role_entity/Role_entity.aod b/entity/Role_entity/Role_entity.aod index 6bff89e164df6c4a4c4d6da1120d2496db260384..82bc56f08e993e369d264cac45d9c6bad35e0a7b 100644 --- a/entity/Role_entity/Role_entity.aod +++ b/entity/Role_entity/Role_entity.aod @@ -46,29 +46,30 @@ <entityName>PermissionDetail_entity</entityName> <fieldName>Permissions</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>PermissionOverviews</name> <children> <entityParameter> <name>RoleTitle_param</name> + <valueProcess>%aditoprj%/entity/Role_entity/entityfields/permissionoverviews/children/roletitle_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>PermissionOverviews</name> <dependency> <name>dependency</name> <entityName>PermissionOverview_entity</entityName> <fieldName>PermissionOverviews</fieldName> </dependency> - <children> - <entityParameter> - <name>RoleTitle_param</name> - <valueProcess>%aditoprj%/entity/Role_entity/entityfields/permissionoverviews/children/roletitle_param/valueProcess.js</valueProcess> - </entityParameter> - </children> </entityConsumer> <entityProvider> <name>Roles</name> <recordContainer>jDito</recordContainer> + <children> + <entityParameter> + <name>ExcludeRoles_param</name> + <expose v="false" /> + </entityParameter> + </children> <dependencies> <entityDependency> <name>64d800d0-4db5-4b95-ab6a-9197b83cc09c</name> @@ -89,12 +90,6 @@ <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>ExcludeRoles_param</name> - <expose v="false" /> - </entityParameter> - </children> </entityProvider> <entityParameter> <name>ExcludeRoles_param</name> @@ -132,11 +127,6 @@ <entityConsumer> <name>RoleChildrens</name> <onValidation>%aditoprj%/entity/Role_entity/entityfields/rolechildrens/onValidation.js</onValidation> - <dependency> - <name>dependency</name> - <entityName>RoleChildren_entity</entityName> - <fieldName>RoleChildrens</fieldName> - </dependency> <children> <entityParameter> <name>RoleId_param</name> @@ -147,6 +137,11 @@ <valueProcess>%aditoprj%/entity/Role_entity/entityfields/rolechildrens/children/roletype_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>RoleChildren_entity</entityName> + <fieldName>RoleChildrens</fieldName> + </dependency> </entityConsumer> <entityActionField> <name>deleteEverythingLinkedToRole</name> @@ -157,17 +152,17 @@ </entityActionField> <entityConsumer> <name>RoleParents</name> - <dependency> - <name>dependency</name> - <entityName>RoleParent_entity</entityName> - <fieldName>RoleParents</fieldName> - </dependency> <children> <entityParameter> <name>RoleId_param</name> <valueProcess>%aditoprj%/entity/Role_entity/entityfields/roleparents/children/roleid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>RoleParent_entity</entityName> + <fieldName>RoleParents</fieldName> + </dependency> </entityConsumer> <entityProvider> <name>#PROVIDER_AGGREGATES</name> diff --git a/entity/SalesprojectMilestone_entity/SalesprojectMilestone_entity.aod b/entity/SalesprojectMilestone_entity/SalesprojectMilestone_entity.aod index c420a5c09b4db9bebb7ad575435fa090ea80b552..8da44d6020598d2c9a5d4a108f7e9d5017a85e11 100644 --- a/entity/SalesprojectMilestone_entity/SalesprojectMilestone_entity.aod +++ b/entity/SalesprojectMilestone_entity/SalesprojectMilestone_entity.aod @@ -60,10 +60,6 @@ <name>SalesprojectMilestones</name> <recordContainer>db</recordContainer> <children> - <entityParameter> - <name>ObjectRowId_param</name> - <expose v="true" /> - </entityParameter> <entityParameter> <name>Kind_param</name> <expose v="false" /> @@ -77,17 +73,17 @@ </entityField> <entityConsumer> <name>Keywords</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/SalesprojectMilestone_entity/entityfields/keywords/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>Kind_param</name> @@ -96,6 +92,12 @@ </entityParameter> <entityProvider> <name>StateMilestones</name> + <children> + <entityParameter> + <name>Kind_param</name> + <valueProcess>%aditoprj%/entity/SalesprojectMilestone_entity/entityfields/statemilestones/children/kind_param/valueProcess.js</valueProcess> + </entityParameter> + </children> <dependencies> <entityDependency> <name>f705534d-dcf3-4049-a1ea-3f75e93aa2f0</name> @@ -104,15 +106,15 @@ <isConsumer v="false" /> </entityDependency> </dependencies> + </entityProvider> + <entityProvider> + <name>PhaseMilestones</name> <children> <entityParameter> <name>Kind_param</name> - <valueProcess>%aditoprj%/entity/SalesprojectMilestone_entity/entityfields/statemilestones/children/kind_param/valueProcess.js</valueProcess> + <valueProcess>%aditoprj%/entity/SalesprojectMilestone_entity/entityfields/phasemilestones/children/kind_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityProvider> - <entityProvider> - <name>PhaseMilestones</name> <dependencies> <entityDependency> <name>b132527b-990c-416a-b2d6-ddbe6f4397e2</name> @@ -121,12 +123,6 @@ <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>Kind_param</name> - <valueProcess>%aditoprj%/entity/SalesprojectMilestone_entity/entityfields/phasemilestones/children/kind_param/valueProcess.js</valueProcess> - </entityParameter> - </children> </entityProvider> <entityConsumer> <name>SalesProjectPhases</name> diff --git a/entity/SalesprojectMilestone_entity/recordcontainers/db/conditionProcess.js b/entity/SalesprojectMilestone_entity/recordcontainers/db/conditionProcess.js index 9a21e39ea75ecfa1a1d8989379141d381f361144..06315b6b320bd3388370dccb3c501946043083c7 100644 --- a/entity/SalesprojectMilestone_entity/recordcontainers/db/conditionProcess.js +++ b/entity/SalesprojectMilestone_entity/recordcontainers/db/conditionProcess.js @@ -5,5 +5,4 @@ var cond = newWhere() .andIfSet("SALESPROJECT_MILESTONE.SALESPROJECT_ID", "$param.SalesprojectId_param") .andIfSet("SALESPROJECT_MILESTONE.KIND", "$param.Kind_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/SalesprojectSource_entity/SalesprojectSource_entity.aod b/entity/SalesprojectSource_entity/SalesprojectSource_entity.aod index 7e2e4769fec4c4ac972fa7e08bde182d1b3ddf92..4effdbc2ceaff937a8ea9eb6a86b1f419c17a587 100644 --- a/entity/SalesprojectSource_entity/SalesprojectSource_entity.aod +++ b/entity/SalesprojectSource_entity/SalesprojectSource_entity.aod @@ -22,12 +22,6 @@ <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>ObjectRowId_param</name> - <expose v="true" /> - </entityParameter> - </children> </entityProvider> <entityParameter> <name>SalesprojectId_param</name> @@ -61,11 +55,6 @@ </entityField> <entityConsumer> <name>KeywordSources</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> @@ -73,6 +62,11 @@ <expose v="false" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityField> <name>INFO</name> diff --git a/entity/SalesprojectSource_entity/recordcontainers/db/conditionProcess.js b/entity/SalesprojectSource_entity/recordcontainers/db/conditionProcess.js index bad867525a17aebb0ecc286db4afeadc7f846b7f..ab13b330a620c500e29ccd63c8c4fad58ba3fcfe 100644 --- a/entity/SalesprojectSource_entity/recordcontainers/db/conditionProcess.js +++ b/entity/SalesprojectSource_entity/recordcontainers/db/conditionProcess.js @@ -4,5 +4,4 @@ import("Sql_lib"); var cond = newWhereIfSet("SALESPROJECT_TOUCHPOINT.SALESPROJECT_ID", "$param.SalesprojectId_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod index 26c7f691c115683f7bfa8697b12a9af73f9e3c27..bbe19fd7cf0c5a29fb1036d0841e1f07169f5e32 100644 --- a/entity/Salesproject_entity/Salesproject_entity.aod +++ b/entity/Salesproject_entity/Salesproject_entity.aod @@ -12,6 +12,7 @@ </siblings> <grantDeleteProcess>%aditoprj%/entity/Salesproject_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/Salesproject_entity/contentTitleProcess.js</contentTitleProcess> + <contentDescriptionProcess>%aditoprj%/entity/Salesproject_entity/contentDescriptionProcess.js</contentDescriptionProcess> <afterUiInit>%aditoprj%/entity/Salesproject_entity/afterUiInit.js</afterUiInit> <onValidation>%aditoprj%/entity/Salesproject_entity/onValidation.js</onValidation> <useFavorites v="true" /> @@ -146,34 +147,39 @@ </entityField> <entityConsumer> <name>SalesprojectSources</name> - <children> - <entityParameter> - <name>SalesprojectId_param</name> - <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/salesprojectsources/children/salesprojectid_param/valueProcess.js</valueProcess> - </entityParameter> - </children> <dependency> <name>dependency</name> <entityName>SalesprojectSource_entity</entityName> <fieldName>SalesprojectSouces</fieldName> </dependency> - </entityConsumer> - <entityConsumer> - <name>SalesprojectPhaseMilestones</name> <children> <entityParameter> <name>SalesprojectId_param</name> - <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/salesprojectphasemilestones/children/salesprojectid_param/valueProcess.js</valueProcess> + <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/salesprojectsources/children/salesprojectid_param/valueProcess.js</valueProcess> </entityParameter> </children> + </entityConsumer> + <entityConsumer> + <name>SalesprojectPhaseMilestones</name> <dependency> <name>dependency</name> <entityName>SalesprojectMilestone_entity</entityName> <fieldName>PhaseMilestones</fieldName> </dependency> + <children> + <entityParameter> + <name>SalesprojectId_param</name> + <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/salesprojectphasemilestones/children/salesprojectid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> </entityConsumer> <entityConsumer> <name>Forecasts</name> + <dependency> + <name>dependency</name> + <entityName>Forecast_entity</entityName> + <fieldName>Links</fieldName> + </dependency> <children> <entityParameter> <name>ObjectType_param</name> @@ -186,15 +192,15 @@ <expose v="true" /> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Forecast_entity</entityName> - <fieldName>Links</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>Competitions</name> <selectionMode>MULTI</selectionMode> + <dependency> + <name>dependency</name> + <entityName>Competition_entity</entityName> + <fieldName>Links</fieldName> + </dependency> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -207,14 +213,14 @@ <expose v="true" /> </entityParameter> </children> + </entityConsumer> + <entityConsumer> + <name>Offers</name> <dependency> <name>dependency</name> - <entityName>Competition_entity</entityName> + <entityName>Offer_entity</entityName> <fieldName>Links</fieldName> </dependency> - </entityConsumer> - <entityConsumer> - <name>Offers</name> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -227,14 +233,14 @@ <expose v="true" /> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Offer_entity</entityName> - <fieldName>Links</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>Activities</name> + <dependency> + <name>dependency</name> + <entityName>Activity_entity</entityName> + <fieldName>LinkedObjects</fieldName> + </dependency> <children> <entityParameter> <name>PresetLinks_param</name> @@ -249,14 +255,14 @@ <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/activities/children/objectid_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Activity_entity</entityName> - <fieldName>LinkedObjects</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>Members</name> + <dependency> + <name>dependency</name> + <entityName>Member_entity</entityName> + <fieldName>WithDistrictResponsibles</fieldName> + </dependency> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -281,11 +287,6 @@ <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/members/children/salesprojectcode_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Member_entity</entityName> - <fieldName>WithDistrictResponsibles</fieldName> - </dependency> </entityConsumer> <entityActionField> <name>newOffer</name> @@ -298,6 +299,11 @@ <entityConsumer> <name>Timetrackings</name> <refreshParent v="true" /> + <dependency> + <name>dependency</name> + <entityName>Timetracking_entity</entityName> + <fieldName>Timetrackings</fieldName> + </dependency> <children> <entityParameter> <name>ObjectId_param</name> @@ -308,11 +314,6 @@ <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/timetrackings/children/rowid_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Timetracking_entity</entityName> - <fieldName>Timetrackings</fieldName> - </dependency> </entityConsumer> <entityParameter> <name>ContactId_param</name> @@ -336,6 +337,11 @@ <entityConsumer> <name>Documents</name> <selectionMode>MULTI</selectionMode> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>Documents</fieldName> + </dependency> <children> <entityParameter> <name>AssignmentRowId_param</name> @@ -350,15 +356,15 @@ <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/documents/children/mstteamid_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>Documents</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>MainDocuments</name> <stateProcess>%aditoprj%/entity/Salesproject_entity/entityfields/maindocuments/stateProcess.js</stateProcess> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>MainDocuments</fieldName> + </dependency> <children> <entityParameter> <name>AssignmentRowId_param</name> @@ -369,11 +375,6 @@ <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/maindocuments/children/assignmenttable_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>MainDocuments</fieldName> - </dependency> </entityConsumer> <entityActionField> <name>newTimetracking</name> @@ -384,6 +385,11 @@ </entityActionField> <entityConsumer> <name>KeywordProbabilties</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> <children> <entityParameter> <name>ContainerName_param</name> @@ -392,14 +398,14 @@ <expose v="false" /> </entityParameter> </children> + </entityConsumer> + <entityConsumer> + <name>KeywordStates</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> - </entityConsumer> - <entityConsumer> - <name>KeywordStates</name> <children> <entityParameter> <name>ContainerName_param</name> @@ -407,11 +413,6 @@ <expose v="false" /> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> </entityConsumer> <entityActionField> <name>newActivity</name> @@ -431,17 +432,17 @@ <entityConsumer> <name>KeywordWonLost</name> <selectionMode>MULTI</selectionMode> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/keywordwonlost/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> </entityConsumer> <entityField> <name>REASONS</name> @@ -458,17 +459,6 @@ </entityField> <entityProvider> <name>Salesprojects</name> - <children> - <entityParameter> - <name>ContactId_param</name> - <expose v="true" /> - <mandatory v="true" /> - </entityParameter> - <entityParameter> - <name>PresetTitle_param</name> - <expose v="false" /> - </entityParameter> - </children> <dependencies> <entityDependency> <name>0925d17f-a26a-4641-aaf4-0f74796fefa7</name> @@ -489,6 +479,17 @@ <isConsumer v="false" /> </entityDependency> </dependencies> + <children> + <entityParameter> + <name>ContactId_param</name> + <expose v="true" /> + <mandatory v="true" /> + </entityParameter> + <entityParameter> + <name>PresetTitle_param</name> + <expose v="false" /> + </entityParameter> + </children> </entityProvider> <entityActionField> <name>newTask</name> @@ -499,6 +500,11 @@ <entityConsumer> <name>Tasks</name> <stateProcess>%aditoprj%/entity/Salesproject_entity/entityfields/tasks/stateProcess.js</stateProcess> + <dependency> + <name>dependency</name> + <entityName>Task_entity</entityName> + <fieldName>Tasks</fieldName> + </dependency> <children> <entityParameter> <name>RowId_param</name> @@ -513,14 +519,17 @@ <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/tasks/children/objectid_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Task_entity</entityName> - <fieldName>Tasks</fieldName> - </dependency> </entityConsumer> <entityProvider> <name>OpenSalesprojects</name> + <dependencies> + <entityDependency> + <name>631f55f9-fb0f-4205-bdb8-6e3476268ab4</name> + <entityName>Offer_entity</entityName> + <fieldName>Salesprojects</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> <children> <entityParameter> <name>Status_param</name> @@ -531,14 +540,6 @@ <expose v="false" /> </entityParameter> </children> - <dependencies> - <entityDependency> - <name>631f55f9-fb0f-4205-bdb8-6e3476268ab4</name> - <entityName>Offer_entity</entityName> - <fieldName>Salesprojects</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> </entityProvider> <entityParameter> <name>Status_param</name> @@ -547,22 +548,27 @@ </entityParameter> <entityConsumer> <name>SalesprojectStateMilestones</name> + <dependency> + <name>dependency</name> + <entityName>SalesprojectMilestone_entity</entityName> + <fieldName>StateMilestones</fieldName> + </dependency> <children> <entityParameter> <name>SalesprojectId_param</name> <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/salesprojectstatemilestones/children/salesprojectid_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>SalesprojectMilestone_entity</entityName> - <fieldName>StateMilestones</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>Attributes</name> <stateProcess>%aditoprj%/entity/Salesproject_entity/entityfields/attributes/stateProcess.js</stateProcess> <onValidation>%aditoprj%/entity/Salesproject_entity/entityfields/attributes/onValidation.js</onValidation> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>AttributeRelations</fieldName> + </dependency> <children> <entityParameter> <name>ObjectType_param</name> @@ -573,15 +579,15 @@ <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>AttributeRelations</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>AttributeTree</name> <stateProcess>%aditoprj%/entity/Salesproject_entity/entityfields/attributetree/stateProcess.js</stateProcess> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>TreeProvider</fieldName> + </dependency> <children> <entityParameter> <name>ObjectType_param</name> @@ -592,29 +598,29 @@ <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>TreeProvider</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>LogHistories</name> + <dependency> + <name>dependency</name> + <entityName>LogHistory_entity</entityName> + <fieldName>LogHistoryProvider</fieldName> + </dependency> <children> <entityParameter> <name>tablenames_param</name> <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>LogHistory_entity</entityName> - <fieldName>LogHistoryProvider</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>Classifications</name> <refreshParent v="true" /> + <dependency> + <name>dependency</name> + <entityName>Classification_entity</entityName> + <fieldName>Classifications</fieldName> + </dependency> <children> <entityParameter> <name>ObjectRowid_param</name> @@ -629,11 +635,6 @@ <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/classifications/children/classificationtype_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Classification_entity</entityName> - <fieldName>Classifications</fieldName> - </dependency> </entityConsumer> <entityField> <name>RemainingTime</name> @@ -647,6 +648,11 @@ </entityField> <entityConsumer> <name>SalesprojectForecastCharts</name> + <dependency> + <name>dependency</name> + <entityName>Turnover_entity</entityName> + <fieldName>FilteredTurnovers</fieldName> + </dependency> <children> <entityParameter> <name>SalesprojectId_param</name> @@ -665,25 +671,20 @@ <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/salesprojectforecastcharts/children/yearcounttoshow_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Turnover_entity</entityName> - <fieldName>FilteredTurnovers</fieldName> - </dependency> </entityConsumer> <entityConsumer> <name>SalesprojectPhaseStepper</name> + <dependency> + <name>dependency</name> + <entityName>SalesprojectPhase_entity</entityName> + <fieldName>Phases</fieldName> + </dependency> <children> <entityParameter> <name>CurrentPhase_param</name> <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/salesprojectphasestepper/children/currentphase_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>SalesprojectPhase_entity</entityName> - <fieldName>Phases</fieldName> - </dependency> </entityConsumer> <entityField> <name>PHASEINFO</name> @@ -706,17 +707,17 @@ </entityField> <entityConsumer> <name>ProjectTypeAttribute</name> + <dependency> + <name>dependency</name> + <entityName>Attribute_entity</entityName> + <fieldName>SpecificAttribute</fieldName> + </dependency> <children> <entityParameter> <name>ObjectType_param</name> <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/projecttypeattribute/children/objecttype_param/valueProcess.js</valueProcess> </entityParameter> </children> - <dependency> - <name>dependency</name> - <entityName>Attribute_entity</entityName> - <fieldName>SpecificAttribute</fieldName> - </dependency> </entityConsumer> <entityProvider> <name>QuickEntrySalesprojects</name> @@ -778,6 +779,12 @@ <title>Classification</title> <groupable v="true" /> </entityField> + <entityField> + <name>DATE_NEW</name> + </entityField> + <entityField> + <name>ACTIVE</name> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -944,6 +951,14 @@ <name>MST_TEAM_ID.displayValue</name> <recordfield>MST_TEAM.TEAMNAME</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>SALESPROJECT.STARTDATE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ACTIVE.value</name> + <expression>%aditoprj%/entity/Salesproject_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <filterExtensions> <filterExtensionSet> diff --git a/entity/Salesproject_entity/contentDescriptionProcess.js b/entity/Salesproject_entity/contentDescriptionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3e00d9c6738bf8df48a424143dcf200df3fece54 --- /dev/null +++ b/entity/Salesproject_entity/contentDescriptionProcess.js @@ -0,0 +1,14 @@ +import("Keyword_lib"); +import("system.translate"); +import("system.datetime"); +import("system.vars"); +import("system.result"); +import("KeywordRegistry_basic"); + +var res = [translate.text("Phase") + ": " + KeywordUtils.getViewValue($KeywordRegistry.salesprojectPhase(), vars.get("$field.PHASE")), + translate.text("Classification: ") + vars.get("$field.CLASSIFICATIONVALUE"), + translate.text("Volume") + ": " + vars.get("$field.VOLUME.displayValue"), + translate.text("Probability") + ": " + vars.get("$field.PROBABILITY.displayValue"), + translate.text("Creation date") + ": " + datetime.toDate(vars.get("$field.DATE_NEW"), translate.text("dd.MM.yyyy"))]; + +result.string(res.join(" | ")); \ No newline at end of file diff --git a/entity/Salesproject_entity/contentTitleProcess.js b/entity/Salesproject_entity/contentTitleProcess.js index 5465ff4efe7615371cc39ef88551a10e36412f4c..dd3706b77cb1d6e5b485855656abd40eff8a5133 100644 --- a/entity/Salesproject_entity/contentTitleProcess.js +++ b/entity/Salesproject_entity/contentTitleProcess.js @@ -1,4 +1,6 @@ import("system.vars"); import("system.result"); -result.string(vars.get("$field.PROJECTTITLE")); \ No newline at end of file +var res = [vars.get("$field.PROJECTCODE"), vars.get("$field.PROJECTTITLE"), vars.get("$field.STATUS.displayValue")]; + +result.string(res.join(" | ")); \ No newline at end of file diff --git a/entity/Salesproject_entity/recordcontainers/db/conditionProcess.js b/entity/Salesproject_entity/recordcontainers/db/conditionProcess.js index 507cd54e83ac2facada8bc80dae5fd6d8cbc9237..94792e060541b80096169073281f4bde6e365f2b 100644 --- a/entity/Salesproject_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Salesproject_entity/recordcontainers/db/conditionProcess.js @@ -3,7 +3,6 @@ import("system.result"); import("system.vars"); import("Sql_lib"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(newWhereIfSet("SALESPROJECT.CONTACT_ID", "$param.ContactId_param") .andIfSet("SALESPROJECT.STATUS", "$param.Status_param") .toString()); \ No newline at end of file diff --git a/entity/Salesproject_entity/recordcontainers/db/onDBInsert.js b/entity/Salesproject_entity/recordcontainers/db/onDBInsert.js index 38fe9698031dd654c3a8a1e3a37aa506cbb72a8e..ac292d8633e479eb892884d9d62652463b34c980 100644 --- a/entity/Salesproject_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Salesproject_entity/recordcontainers/db/onDBInsert.js @@ -1,4 +1,3 @@ -import("Classification_lib"); import("Workflow_lib"); import("Context_lib"); import("Attribute_lib"); @@ -17,11 +16,6 @@ if (vars.get("$field.PROJECTTYPE")) .insertAttribute(vars.get("$field.PROJECTTYPE"), true); } -var salesprojectId = vars.get("$field.SALESPROJECTID"); -var contextname = vars.get("$sys.currentcontextname"); - -ClassificationUtils.insertEmptyClassification(salesprojectId, contextname); - //start the execution in afterOperatingState, because here the dataset is not yet inserted vars.set("$context.workflowQueue", {}); WorkflowSignalSender.inserted(); \ No newline at end of file diff --git a/entity/Salesproject_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js b/entity/Salesproject_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..d91a07968d0c061d1891c1479802d377dc7f2167 --- /dev/null +++ b/entity/Salesproject_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js @@ -0,0 +1,6 @@ +import("Context_lib"); +import("system.result"); +import("KeywordRegistry_basic"); + +var activArr = [$KeywordRegistry.salesprojectState$open(), $KeywordRegistry.salesprojectState$postponed()]; +result.string(ContextUtils.buildActiveCaseWhen(activArr, "SALESPROJECT.STATUS")); \ No newline at end of file diff --git a/entity/SerialLetter_entity/recordcontainers/db/onDBUpdate.js b/entity/SerialLetter_entity/recordcontainers/db/onDBUpdate.js index 9b94cb43201f9ff942608adfb3f3a694a5a555b6..20c7fc0a0ddd70bb3075f0f5c90bd95d19e01233 100644 --- a/entity/SerialLetter_entity/recordcontainers/db/onDBUpdate.js +++ b/entity/SerialLetter_entity/recordcontainers/db/onDBUpdate.js @@ -18,8 +18,6 @@ var template = DocumentTemplate.fromUpload(bindata); if (template.content) { SingleBinaryUtils.set("SERIALLETTER", "DOCUMENT", letterId, template.content, template.filename, ""); - - neon.refresh(["$field.content"]); } WorkflowSignalSender.updated(); \ No newline at end of file diff --git a/entity/SingleObject_entity/SingleObject_entity.aod b/entity/SingleObject_entity/SingleObject_entity.aod index a810e79749d4042b0413c4deccbd2132e1f4fe62..b2d528450e42e8451f323774cd5f1cbc16495f97 100644 --- a/entity/SingleObject_entity/SingleObject_entity.aod +++ b/entity/SingleObject_entity/SingleObject_entity.aod @@ -9,11 +9,9 @@ </entityProvider> <entityField> <name>TARGET_CONTEXT</name> - <valueProcess>%aditoprj%/entity/SingleObject_entity/entityfields/target_context/valueProcess.js</valueProcess> </entityField> <entityField> <name>UID</name> - <valueProcess>%aditoprj%/entity/SingleObject_entity/entityfields/uid/valueProcess.js</valueProcess> </entityField> <entityParameter> <name>TargetContext_param</name> diff --git a/entity/Stock_entity/recordcontainers/db/conditionProcess.js b/entity/Stock_entity/recordcontainers/db/conditionProcess.js index eb881a660fe9112a6d7756fe734491ad20d45165..b0ca1d729b574c54f13543090012d62a9d8ca288 100644 --- a/entity/Stock_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Stock_entity/recordcontainers/db/conditionProcess.js @@ -1,6 +1,5 @@ import("system.result"); import("Sql_lib"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(newWhereIfSet("STOCK.PRODUCT_ID", "$param.ProductId_param") .toString()); \ No newline at end of file diff --git a/entity/SupportTicket_entity/SupportTicket_entity.aod b/entity/SupportTicket_entity/SupportTicket_entity.aod index a289e1083cc46db17d59d4a393a87e5537cb64f2..7449b20944182a2ae8080df096fc422e31e44ca2 100644 --- a/entity/SupportTicket_entity/SupportTicket_entity.aod +++ b/entity/SupportTicket_entity/SupportTicket_entity.aod @@ -5,6 +5,7 @@ <documentation>%aditoprj%/entity/SupportTicket_entity/documentation.adoc</documentation> <title>Support Ticket</title> <contentTitleProcess>%aditoprj%/entity/SupportTicket_entity/contentTitleProcess.js</contentTitleProcess> + <contentDescriptionProcess>%aditoprj%/entity/SupportTicket_entity/contentDescriptionProcess.js</contentDescriptionProcess> <afterUiInit>%aditoprj%/entity/SupportTicket_entity/afterUiInit.js</afterUiInit> <onValidation>%aditoprj%/entity/SupportTicket_entity/onValidation.js</onValidation> <useFavorites v="true" /> @@ -459,6 +460,12 @@ <name>TASK_ICON_COLOR</name> <valueProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/task_icon_color/valueProcess.js</valueProcess> </entityField> + <entityField> + <name>DATE_NEW</name> + </entityField> + <entityField> + <name>ACTIVE</name> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -597,6 +604,14 @@ <recordfield>TICKET.TICKETID</recordfield> <aggregateType>COUNT</aggregateType> </aggregateFieldDbMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>TASK.START_DATE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ACTIVE.value</name> + <expression>%aditoprj%/entity/SupportTicket_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> <filterExtensions> <filterExtension> diff --git a/entity/SupportTicket_entity/contentDescriptionProcess.js b/entity/SupportTicket_entity/contentDescriptionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..1d91623c4ae8f611109db99446b52adabd903dfd --- /dev/null +++ b/entity/SupportTicket_entity/contentDescriptionProcess.js @@ -0,0 +1,18 @@ +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.translate"); +import("system.datetime"); +import("system.vars"); +import("system.result"); + +var res = []; + +if(vars.get("$field.TASK_EDITOR_CONTACT_ID")) + res = [translate.text("{$TICKET_EDITOR}") + ": " + vars.get("$field.TASK_EDITOR_CONTACT_ID.displayValue")]; + + res.push(translate.text("Maturity") + ": " + datetime.toDate(vars.get("$field.TASK_MATURITY_DATE"), translate.text("dd.MM.yyyy"))); + res.push(translate.text("Progress") + ": " + KeywordUtils.getViewValue($KeywordRegistry.taskProgress(), vars.get("$field.TASK_PROGRESS"))); + res.push(translate.text("Creation date") + ": " + datetime.toDate(vars.get("$field.DATE_NEW"), translate.text("dd.MM.yyyy"))); + +result.string(res.join(" | ")); + \ No newline at end of file diff --git a/entity/SupportTicket_entity/contentTitleProcess.js b/entity/SupportTicket_entity/contentTitleProcess.js index aae1064b78ee311afec427a24872f4136046df42..626ec76cac0a3020000f229da4e128040bd21cd7 100644 --- a/entity/SupportTicket_entity/contentTitleProcess.js +++ b/entity/SupportTicket_entity/contentTitleProcess.js @@ -1,4 +1,9 @@ +import("KeywordRegistry_basic"); +import("Keyword_lib"); import("system.vars"); import("system.result"); -result.string(vars.get("$field.TASK_SUBJECT")) \ No newline at end of file + +var res = [vars.get("$field.TASK_SUBJECT"), vars.get("$field.TASK_STATUS.displayValue")]; + +result.string(res.join(" | ")) \ No newline at end of file diff --git a/entity/SupportTicket_entity/recordcontainers/db/conditionProcess.js b/entity/SupportTicket_entity/recordcontainers/db/conditionProcess.js index 1cc6eb48ac1da6603edbdb729d16af958c269aa5..058d0ec06940cfc36ccf27bfc13ed7dc8b315518 100644 --- a/entity/SupportTicket_entity/recordcontainers/db/conditionProcess.js +++ b/entity/SupportTicket_entity/recordcontainers/db/conditionProcess.js @@ -31,5 +31,4 @@ if (vars.get("$param.RowId_param") && vars.get("$param.ObjectId_param")) cond.andIfSet("TASK.PARENT_ID", "$param.ParentId_param"); cond.andIfSet("TASK.PARENT_CONTEXT", "$param.ParentContext_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/SupportTicket_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js b/entity/SupportTicket_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..26673fbc448c10ccc7ef9e1e6bc5fc11d1fed04d --- /dev/null +++ b/entity/SupportTicket_entity/recordcontainers/db/recordfieldmappings/active.value/expression.js @@ -0,0 +1,7 @@ +import("Context_lib"); +import("system.result"); +import("KeywordRegistry_basic"); + +var activArr = [$KeywordRegistry.taskStatus$new(), $KeywordRegistry.taskStatus$unassigned(), $KeywordRegistry.taskStatus$assigned(), +$KeywordRegistry.taskStatus$inProgress(), $KeywordRegistry.taskStatus$waiting(), $KeywordRegistry.taskStatus$customerChecks()]; +result.string(ContextUtils.buildActiveCaseWhen(activArr, "TASK.STATUS")); \ No newline at end of file diff --git a/entity/TaskLink_entity/entityfields/object_rowid/displayValueProcess.js b/entity/TaskLink_entity/entityfields/object_rowid/displayValueProcess.js index c87f4789fa9fd244ebff4881a6a8e59bffe58040..23f715a5e9d43ac6b18f2b7d009a7742eef77d34 100644 --- a/entity/TaskLink_entity/entityfields/object_rowid/displayValueProcess.js +++ b/entity/TaskLink_entity/entityfields/object_rowid/displayValueProcess.js @@ -6,5 +6,5 @@ import("Context_lib"); if(vars.get("$field.OBJECT_ROWID") && vars.get("$field.OBJECT_TYPE")) { - result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID")))); + result.string(ContextUtils.getTitleByContext(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID"))); } \ No newline at end of file diff --git a/entity/TaskLink_entity/recordcontainers/db/conditionProcess.js b/entity/TaskLink_entity/recordcontainers/db/conditionProcess.js index 1b4535c9556a37f6e69084f7570ea2fde14e7e6d..2b98b257ac0a7f777b4ccfab082c730b8681128e 100644 --- a/entity/TaskLink_entity/recordcontainers/db/conditionProcess.js +++ b/entity/TaskLink_entity/recordcontainers/db/conditionProcess.js @@ -3,5 +3,4 @@ import("Sql_lib"); var cond = newWhereIfSet("TASKLINK.TASK_ID", "$param.TaskId_param"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); \ No newline at end of file diff --git a/entity/Task_entity/Task_entity.aod b/entity/Task_entity/Task_entity.aod index 0ed30f9267ac826ee8fa702c136cbdb52ddb1502..45f3ee0f0cf0c4079ae2e8cbc05a6560bf58e0a7 100644 --- a/entity/Task_entity/Task_entity.aod +++ b/entity/Task_entity/Task_entity.aod @@ -6,6 +6,7 @@ <title>Task</title> <grantDeleteProcess>%aditoprj%/entity/Task_entity/grantDeleteProcess.js</grantDeleteProcess> <contentTitleProcess>%aditoprj%/entity/Task_entity/contentTitleProcess.js</contentTitleProcess> + <contentDescriptionProcess>%aditoprj%/entity/Task_entity/contentDescriptionProcess.js</contentDescriptionProcess> <afterUiInit>%aditoprj%/entity/Task_entity/afterUiInit.js</afterUiInit> <onValidation>%aditoprj%/entity/Task_entity/onValidation.js</onValidation> <initFilterProcess>%aditoprj%/entity/Task_entity/initFilterProcess.js</initFilterProcess> @@ -96,10 +97,10 @@ </entityField> <entityField> <name>PROTECTIONLEVEL</name> - <title>Protected</title> <contentType>BOOLEAN</contentType> <contentTypeProcess>%aditoprj%/entity/Task_entity/entityfields/protectionlevel/contentTypeProcess.js</contentTypeProcess> <dropDownProcess>%aditoprj%/entity/Task_entity/entityfields/protectionlevel/dropDownProcess.js</dropDownProcess> + <titleProcess>%aditoprj%/entity/Task_entity/entityfields/protectionlevel/titleProcess.js</titleProcess> <valueProcess>%aditoprj%/entity/Task_entity/entityfields/protectionlevel/valueProcess.js</valueProcess> </entityField> <entityField> @@ -127,11 +128,6 @@ <entityConsumer> <name>MainDocuments</name> <stateProcess>%aditoprj%/entity/Task_entity/entityfields/maindocuments/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>#PROVIDER</fieldName> - </dependency> <children> <entityParameter> <name>AssignmentRowId_param</name> @@ -142,14 +138,14 @@ <valueProcess>%aditoprj%/entity/Task_entity/entityfields/maindocuments/children/assignmenttable_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>KeywordStates</name> <dependency> <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> + <entityName>Document_entity</entityName> + <fieldName>#PROVIDER</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordStates</name> <children> <entityParameter> <name>ContainerName_param</name> @@ -161,14 +157,14 @@ <valueProcess>%aditoprj%/entity/Task_entity/entityfields/keywordstates/children/whitelistids_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>ModuleTrees</name> <dependency> <name>dependency</name> - <entityName>ModuleTree_entity</entityName> - <fieldName>TreeProviders</fieldName> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>ModuleTrees</name> <children> <entityParameter> <name>ID_param</name> @@ -183,6 +179,11 @@ <mandatory v="false" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>ModuleTree_entity</entityName> + <fieldName>TreeProviders</fieldName> + </dependency> </entityConsumer> <entityField> <name>PARENT_CONTEXT</name> @@ -229,11 +230,6 @@ </entityParameter> <entityConsumer> <name>KeywordPriorities</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> @@ -241,6 +237,11 @@ <expose v="false" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityActionField> <name>newOffer</name> @@ -259,36 +260,58 @@ </entityField> <entityConsumer> <name>KeywordProgress</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Task_entity/entityfields/keywordprogress/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Links</name> <state>EDITABLE</state> - <dependency> - <name>dependency</name> - <entityName>TaskLink_entity</entityName> - <fieldName>Link</fieldName> - </dependency> <children> <entityParameter> <name>TaskId_param</name> <valueProcess>%aditoprj%/entity/Task_entity/entityfields/links/children/taskid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>TaskLink_entity</entityName> + <fieldName>Link</fieldName> + </dependency> </entityConsumer> <entityProvider> <name>Tasks</name> <documentation>%aditoprj%/entity/Task_entity/entityfields/tasks/documentation.adoc</documentation> + <children> + <entityParameter> + <name>RowId_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>PresetLinks_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>ParentId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ParentContext_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ObjectId_param</name> + <expose v="true" /> + </entityParameter> + </children> <dependencies> <entityDependency> <name>dd79df43-264c-494b-9c92-cadf19e61db6</name> @@ -357,28 +380,6 @@ <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>RowId_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>PresetLinks_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>ParentId_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>ParentContext_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>ObjectId_param</name> - <expose v="true" /> - </entityParameter> - </children> </entityProvider> <entityParameter> <name>PresetLinks_param</name> @@ -407,26 +408,21 @@ </entityField> <entityConsumer> <name>LogHistories</name> - <dependency> - <name>dependency</name> - <entityName>LogHistory_entity</entityName> - <fieldName>LogHistoryProvider</fieldName> - </dependency> <children> <entityParameter> <name>tablenames_param</name> <valueProcess>%aditoprj%/entity/Task_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>LogHistory_entity</entityName> + <fieldName>LogHistoryProvider</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Documents</name> <selectionMode>MULTI</selectionMode> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>Documents</fieldName> - </dependency> <children> <entityParameter> <name>AssignmentRowId_param</name> @@ -437,6 +433,11 @@ <valueProcess>%aditoprj%/entity/Task_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>Documents</fieldName> + </dependency> </entityConsumer> <entityField> <name>TYPE</name> @@ -503,6 +504,9 @@ <name>ICON_COLOR</name> <valueProcess>%aditoprj%/entity/Task_entity/entityfields/icon_color/valueProcess.js</valueProcess> </entityField> + <entityField> + <name>DATE_NEW</name> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Task_entity/contentDescriptionProcess.js b/entity/Task_entity/contentDescriptionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b07a72fe7cc543e3bedc5d5604f12f28769ffb6b --- /dev/null +++ b/entity/Task_entity/contentDescriptionProcess.js @@ -0,0 +1,5 @@ +import("system.translate"); +import("system.datetime"); +import("system.vars"); +import("system.result"); +result.string(datetime.toDate(vars.get("$field.DATE_NEW"), translate.text("dd.MM.yyyy"))); \ No newline at end of file diff --git a/entity/Task_entity/entityfields/protectionlevel/titleProcess.js b/entity/Task_entity/entityfields/protectionlevel/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..c2997149287a6b22c3e22a5d4bc48d145b314f25 --- /dev/null +++ b/entity/Task_entity/entityfields/protectionlevel/titleProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.translate"); + +//We already changed this title serveral times +//This will be the last time and it's called "Private". Period. +//The reason why this is in a titleProcess and not in the title property is just to write this comment you're reading. +//Note: Whithin a porject feel free to change the title +result.string(translate.text("Private")); \ No newline at end of file diff --git a/entity/Task_entity/recordcontainers/db/conditionProcess.js b/entity/Task_entity/recordcontainers/db/conditionProcess.js index d8acb4d11fe9b9f26e89c697f74bf887f928b04c..c74072623eb5c8a5bed06b76d70c73084a0815bd 100644 --- a/entity/Task_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Task_entity/recordcontainers/db/conditionProcess.js @@ -48,6 +48,5 @@ else } cond.and(protectionLevelCondition); - //TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(cond.toString()); } \ No newline at end of file diff --git a/entity/Timetracking_entity/recordcontainers/db/conditionProcess.js b/entity/Timetracking_entity/recordcontainers/db/conditionProcess.js index 958be5716236ef7cd77321a1cd61ca0e15d31be5..9b3b9ce651860d82a5e85c54ee239ed3b615d424 100644 --- a/entity/Timetracking_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Timetracking_entity/recordcontainers/db/conditionProcess.js @@ -3,7 +3,6 @@ import("system.db"); import("system.result"); import("Sql_lib"); -//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026 result.string(newWhereIfSet("TIMETRACKING.OBJECT_ID", "$param.ObjectId_param") .andIfSet("TIMETRACKING.ROW_ID", "$param.RowId_param") .toString()); diff --git a/entity/VisitPlanEmployeeWeek_entity/VisitPlanEmployeeWeek_entity.aod b/entity/VisitPlanEmployeeWeek_entity/VisitPlanEmployeeWeek_entity.aod index 63130c5f63deebc3bc36702245a2755785fe4a50..d7e664a23695770a983a66ae5599360454629498 100644 --- a/entity/VisitPlanEmployeeWeek_entity/VisitPlanEmployeeWeek_entity.aod +++ b/entity/VisitPlanEmployeeWeek_entity/VisitPlanEmployeeWeek_entity.aod @@ -82,11 +82,6 @@ </entityConsumer> <entityConsumer> <name>Entries</name> - <dependency> - <name>dependency</name> - <entityName>VisitPlanEntry_entity</entityName> - <fieldName>Entries</fieldName> - </dependency> <children> <entityParameter> <name>Entries_param</name> @@ -94,6 +89,11 @@ <expose v="true" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>VisitPlanEntry_entity</entityName> + <fieldName>Entries</fieldName> + </dependency> </entityConsumer> <entityProvider> <name>#PROVIDER_AGGREGATES</name> @@ -136,10 +136,6 @@ <name>CONTACT_ID.value</name> <recordfield>VISITPLANEMPLOYEEWEEK.CONTACT_ID</recordfield> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>CONTACT_ID.displayValue</name> - <expression>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/recordcontainers/db/recordfieldmappings/person_id.displayvalue/expression.js</expression> - </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/WorkflowDefinition_entity/WorkflowDefinition_entity.aod b/entity/WorkflowDefinition_entity/WorkflowDefinition_entity.aod index ab10357478fbae31e30b3f5762444275d68cb28d..b523e8b8d09e3810d231cab32aa37701e5ec5046 100644 --- a/entity/WorkflowDefinition_entity/WorkflowDefinition_entity.aod +++ b/entity/WorkflowDefinition_entity/WorkflowDefinition_entity.aod @@ -77,17 +77,17 @@ <entityConsumer> <name>Instances</name> <selectionMode>MULTI</selectionMode> - <dependency> - <name>dependency</name> - <entityName>WorkflowInstance_entity</entityName> - <fieldName>InstancesOfWorkflow</fieldName> - </dependency> <children> <entityParameter> <name>WorkflowDefinitionKey_param</name> <valueProcess>%aditoprj%/entity/WorkflowDefinition_entity/entityfields/instances/children/workflowdefinitionkey_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>WorkflowInstance_entity</entityName> + <fieldName>InstancesOfWorkflow</fieldName> + </dependency> </entityConsumer> <entityField> <name>KEY</name> @@ -135,11 +135,6 @@ </entityParameter> <entityConsumer> <name>OtherVersions</name> - <dependency> - <name>dependency</name> - <entityName>WorkflowDefinition_entity</entityName> - <fieldName>WorkflowVersions</fieldName> - </dependency> <children> <entityParameter> <name>ProcessDefinitionKey_param</name> @@ -150,9 +145,15 @@ <valueProcess>%aditoprj%/entity/WorkflowDefinition_entity/entityfields/otherversions/children/currentversion_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>WorkflowDefinition_entity</entityName> + <fieldName>WorkflowVersions</fieldName> + </dependency> </entityConsumer> <entityProvider> <name>WorkflowVersions</name> + <documentation>%aditoprj%/entity/WorkflowDefinition_entity/entityfields/workflowversions/documentation.adoc</documentation> <titlePlural>Other versions</titlePlural> <children> <entityParameter> @@ -171,17 +172,17 @@ </entityField> <entityConsumer> <name>StartConfigs</name> - <dependency> - <name>dependency</name> - <entityName>WorkflowStartConfig_entity</entityName> - <fieldName>StartConfig</fieldName> - </dependency> <children> <entityParameter> <name>ProcessDefinitionKey_param</name> <valueProcess>%aditoprj%/entity/WorkflowDefinition_entity/entityfields/startconfigs/children/processdefinitionkey_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>WorkflowStartConfig_entity</entityName> + <fieldName>StartConfig</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>Context_param</name> @@ -195,11 +196,6 @@ </entityActionField> <entityConsumer> <name>Signals</name> - <dependency> - <name>dependency</name> - <entityName>WorkflowSignal_entity</entityName> - <fieldName>ProcessDefinitionSignals</fieldName> - </dependency> <children> <entityParameter> <name>ProcessDefinitionId_param</name> @@ -210,6 +206,11 @@ <valueProcess>%aditoprj%/entity/WorkflowDefinition_entity/entityfields/signals/children/processdefinitionkey_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>WorkflowSignal_entity</entityName> + <fieldName>ProcessDefinitionSignals</fieldName> + </dependency> </entityConsumer> <entityField> <name>VERSION_TITLE</name> @@ -231,17 +232,17 @@ </entityField> <entityConsumer> <name>CategoryKeyword</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/WorkflowDefinition_entity/entityfields/categorykeyword/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityProvider> <name>#PROVIDER_AGGREGATES</name> diff --git a/entity/WorkflowDefinition_entity/entityfields/workflowversions/documentation.adoc b/entity/WorkflowDefinition_entity/entityfields/workflowversions/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..3ea3eb5f375dd862f274e73030cd1c6a8124f24b --- /dev/null +++ b/entity/WorkflowDefinition_entity/entityfields/workflowversions/documentation.adoc @@ -0,0 +1,4 @@ += WorkflowVersions + +Loads all other versions of a workflow definition to show the version history. For that, the process key (ProcessDefinitionKey_param) is required and +the CurrentVersion_param can be used for excluding the currently opened version from the list. \ No newline at end of file diff --git a/entity/WorkflowInstanceHistory_entity/WorkflowInstanceHistory_entity.aod b/entity/WorkflowInstanceHistory_entity/WorkflowInstanceHistory_entity.aod index 8c35ddbe8c30a3772342c03d9a04d3f9c1b60dd4..4b33d427532d30ddafb627ea0089fbae66a6bd11 100644 --- a/entity/WorkflowInstanceHistory_entity/WorkflowInstanceHistory_entity.aod +++ b/entity/WorkflowInstanceHistory_entity/WorkflowInstanceHistory_entity.aod @@ -51,6 +51,7 @@ <name>HistoryForWorkflowInstance</name> <targetContextField>TARGET_CONTEXT</targetContextField> <targetIdField>TASK_ID</targetIdField> + <documentation>%aditoprj%/entity/WorkflowInstanceHistory_entity/entityfields/historyforworkflowinstance/documentation.adoc</documentation> <titlePlural>History</titlePlural> <dependencies> <entityDependency> @@ -77,17 +78,17 @@ </entityField> <entityConsumer> <name>ActivityTypeKeyword</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/WorkflowInstanceHistory_entity/entityfields/activitytypekeyword/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityProvider> <name>#PROVIDER_AGGREGATES</name> diff --git a/entity/WorkflowInstanceHistory_entity/entityfields/historyforworkflowinstance/documentation.adoc b/entity/WorkflowInstanceHistory_entity/entityfields/historyforworkflowinstance/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..8e0c3662b7605dd70bfacb74cf74d55afa61d099 --- /dev/null +++ b/entity/WorkflowInstanceHistory_entity/entityfields/historyforworkflowinstance/documentation.adoc @@ -0,0 +1,3 @@ += HistoryForWorkflowInstance + +Provides a history of the given workflow instance. This includes all the finished activities and tasks of that workflow. \ No newline at end of file diff --git a/entity/WorkflowInstance_entity/WorkflowInstance_entity.aod b/entity/WorkflowInstance_entity/WorkflowInstance_entity.aod index 566506952d10531e4a485461d611e30d6eea4e6a..baf0056902e1eada308214db5fdd0f30d9c05c91 100644 --- a/entity/WorkflowInstance_entity/WorkflowInstance_entity.aod +++ b/entity/WorkflowInstance_entity/WorkflowInstance_entity.aod @@ -18,6 +18,7 @@ </entityField> <entityProvider> <name>InstancesOfWorkflow</name> + <documentation>%aditoprj%/entity/WorkflowInstance_entity/entityfields/instancesofworkflow/documentation.adoc</documentation> <dependencies> <entityDependency> <name>96f047cf-7f3b-417e-ac08-9dc231c5d0ac</name> @@ -79,31 +80,31 @@ </entityField> <entityConsumer> <name>Tasks</name> - <dependency> - <name>dependency</name> - <entityName>WorkflowTask_entity</entityName> - <fieldName>InstanceTasks</fieldName> - </dependency> <children> <entityParameter> <name>WorkflowInstanceId_param</name> <valueProcess>%aditoprj%/entity/WorkflowInstance_entity/entityfields/tasks/children/workflowinstanceid_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>WorkflowDefinitions</name> <dependency> <name>dependency</name> - <entityName>WorkflowDefinition_entity</entityName> - <fieldName>#PROVIDER</fieldName> + <entityName>WorkflowTask_entity</entityName> + <fieldName>InstanceTasks</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>WorkflowDefinitions</name> <children> <entityParameter> <name>Context_param</name> <valueProcess>%aditoprj%/entity/WorkflowInstance_entity/entityfields/workflowdefinitions/children/context_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>WorkflowDefinition_entity</entityName> + <fieldName>#PROVIDER</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>ProcessVariables_param</name> @@ -131,11 +132,6 @@ </entityActionField> <entityConsumer> <name>FinishedTasks</name> - <dependency> - <name>dependency</name> - <entityName>WorkflowTask_entity</entityName> - <fieldName>FinishedInstanceTasks</fieldName> - </dependency> <children> <entityParameter> <name>WorkflowInstanceId_param</name> @@ -146,6 +142,11 @@ <valueProcess>%aditoprj%/entity/WorkflowInstance_entity/entityfields/finishedtasks/children/includeservicetasks_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>WorkflowTask_entity</entityName> + <fieldName>FinishedInstanceTasks</fieldName> + </dependency> </entityConsumer> <entityField> <name>ICON</name> @@ -153,17 +154,17 @@ </entityField> <entityConsumer> <name>History</name> - <dependency> - <name>dependency</name> - <entityName>WorkflowInstanceHistory_entity</entityName> - <fieldName>HistoryForWorkflowInstance</fieldName> - </dependency> <children> <entityParameter> <name>ProcessInstanceId_param</name> <valueProcess>%aditoprj%/entity/WorkflowInstance_entity/entityfields/history/children/processinstanceid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>WorkflowInstanceHistory_entity</entityName> + <fieldName>HistoryForWorkflowInstance</fieldName> + </dependency> </entityConsumer> <entityField> <name>ISFINISHED</name> @@ -174,17 +175,17 @@ <entityConsumer> <name>Variables</name> <stateProcess>%aditoprj%/entity/WorkflowInstance_entity/entityfields/variables/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>WorkflowVariableValue_entity</entityName> - <fieldName>VariablesOfInstance</fieldName> - </dependency> <children> <entityParameter> <name>WorkflowInstanceId_param</name> <valueProcess>%aditoprj%/entity/WorkflowInstance_entity/entityfields/variables/children/workflowinstanceid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>WorkflowVariableValue_entity</entityName> + <fieldName>VariablesOfInstance</fieldName> + </dependency> </entityConsumer> <entityField> <name>DIAGRAM</name> diff --git a/entity/WorkflowInstance_entity/entityfields/instancesofworkflow/documentation.adoc b/entity/WorkflowInstance_entity/entityfields/instancesofworkflow/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..41f9fecfaece367623551c7bfbb8e010271017c8 --- /dev/null +++ b/entity/WorkflowInstance_entity/entityfields/instancesofworkflow/documentation.adoc @@ -0,0 +1,3 @@ += InstancesOfWorkflow + +Provider for all workflow instances started from a specific workflow definition \ No newline at end of file diff --git a/entity/WorkflowLauncher_entity/WorkflowLauncher_entity.aod b/entity/WorkflowLauncher_entity/WorkflowLauncher_entity.aod index e5749fe5101007e83c45d26c9f24bd15561458b1..cb1c24289be4239a3071a00dcf8f9193b8038421 100644 --- a/entity/WorkflowLauncher_entity/WorkflowLauncher_entity.aod +++ b/entity/WorkflowLauncher_entity/WorkflowLauncher_entity.aod @@ -2,6 +2,7 @@ <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> <name>WorkflowLauncher_entity</name> <majorModelMode>DISTRIBUTED</majorModelMode> + <documentation>%aditoprj%/entity/WorkflowLauncher_entity/documentation.adoc</documentation> <recordContainer>dataLess</recordContainer> <entityFields> <entityProvider> @@ -61,17 +62,17 @@ </entityProvider> <entityConsumer> <name>WorkflowDefinitions</name> - <dependency> - <name>dependency</name> - <entityName>WorkflowDefinition_entity</entityName> - <fieldName>#PROVIDER</fieldName> - </dependency> <children> <entityParameter> <name>Context_param</name> <valueProcess>%aditoprj%/entity/WorkflowLauncher_entity/entityfields/workflowdefinitions/children/context_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>WorkflowDefinition_entity</entityName> + <fieldName>#PROVIDER</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>Validationerrors_param</name> diff --git a/entity/WorkflowLauncher_entity/documentation.adoc b/entity/WorkflowLauncher_entity/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..2b9731f8a4e9eb04904c5ee2bd479878bdbd39b4 --- /dev/null +++ b/entity/WorkflowLauncher_entity/documentation.adoc @@ -0,0 +1,3 @@ += WorkflowLauncher_entity + +An entity with dataless recordcontainer to create a dialog that starts workflow instances. \ No newline at end of file diff --git a/entity/WorkflowSignal_entity/WorkflowSignal_entity.aod b/entity/WorkflowSignal_entity/WorkflowSignal_entity.aod index 0482a952cde7ed445aa8048cbb38c08eaee58570..1e857118e9c07f4b1ac03110221c77f1c07688be 100644 --- a/entity/WorkflowSignal_entity/WorkflowSignal_entity.aod +++ b/entity/WorkflowSignal_entity/WorkflowSignal_entity.aod @@ -47,11 +47,6 @@ </entityField> <entityConsumer> <name>Contexts</name> - <dependency> - <name>dependency</name> - <entityName>Context_entity</entityName> - <fieldName>Exclusive</fieldName> - </dependency> <children> <entityParameter> <name>Blacklist_param</name> @@ -62,23 +57,29 @@ <valueProcess>%aditoprj%/entity/WorkflowSignal_entity/entityfields/contexts/children/invertblacklist_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>TriggerKeyword</name> <dependency> <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> + <entityName>Context_entity</entityName> + <fieldName>Exclusive</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>TriggerKeyword</name> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/WorkflowSignal_entity/entityfields/triggerkeyword/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityProvider> <name>ProcessDefinitionSignals</name> + <documentation>%aditoprj%/entity/WorkflowSignal_entity/entityfields/processdefinitionsignals/documentation.adoc</documentation> <dependencies> <entityDependency> <name>f08ff63c-296a-4b1f-8264-b6b1e6c1d748</name> diff --git a/entity/WorkflowSignal_entity/entityfields/processdefinitionsignals/documentation.adoc b/entity/WorkflowSignal_entity/entityfields/processdefinitionsignals/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..7d279f26c91439041be487d34adf21ab2f4d322a --- /dev/null +++ b/entity/WorkflowSignal_entity/entityfields/processdefinitionsignals/documentation.adoc @@ -0,0 +1,3 @@ += ProcessDefinitionSignals + +Provides all signals defined in the given workflow definition. \ No newline at end of file diff --git a/entity/WorkflowStartConfig_entity/WorkflowStartConfig_entity.aod b/entity/WorkflowStartConfig_entity/WorkflowStartConfig_entity.aod index beafceffdfe067862b2781e806816b8aaf9ef50d..e57032a87e242a6b8ff0c370c488b2b318835316 100644 --- a/entity/WorkflowStartConfig_entity/WorkflowStartConfig_entity.aod +++ b/entity/WorkflowStartConfig_entity/WorkflowStartConfig_entity.aod @@ -63,10 +63,6 @@ <name>InvertBlacklist_param</name> <valueProcess>%aditoprj%/entity/WorkflowStartConfig_entity/entityfields/contexts/children/invertblacklist_param/valueProcess.js</valueProcess> </entityParameter> - <entityParameter> - <name>GetAllContexts_param</name> - <valueProcess>%aditoprj%/entity/WorkflowStartConfig_entity/entityfields/contexts/children/getallcontexts_param/valueProcess.js</valueProcess> - </entityParameter> </children> </entityConsumer> <entityConsumer> diff --git a/entity/WorkflowStartConfig_entity/entityfields/contexts/children/getallcontexts_param/valueProcess.js b/entity/WorkflowStartConfig_entity/entityfields/contexts/children/getallcontexts_param/valueProcess.js deleted file mode 100644 index 40effa0178464da0c7850912345f19c7fa95975a..0000000000000000000000000000000000000000 --- a/entity/WorkflowStartConfig_entity/entityfields/contexts/children/getallcontexts_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/WorkflowTask_entity/WorkflowTask_entity.aod b/entity/WorkflowTask_entity/WorkflowTask_entity.aod index 96272fe5f1d9bb562efd850639fc9254cccf61e6..5a9cabd4bea5789fa4b4cc7f5c4e3ebddde6571d 100644 --- a/entity/WorkflowTask_entity/WorkflowTask_entity.aod +++ b/entity/WorkflowTask_entity/WorkflowTask_entity.aod @@ -76,14 +76,7 @@ </entityField> <entityProvider> <name>InstanceTasks</name> - <dependencies> - <entityDependency> - <name>5913327f-1bb4-48b8-846e-639274290cee</name> - <entityName>WorkflowInstance_entity</entityName> - <fieldName>Tasks</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> + <documentation>%aditoprj%/entity/WorkflowTask_entity/entityfields/instancetasks/documentation.adoc</documentation> <children> <entityParameter> <name>OnlyFinishedTasks_param</name> @@ -94,6 +87,14 @@ <expose v="false" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>5913327f-1bb4-48b8-846e-639274290cee</name> + <entityName>WorkflowInstance_entity</entityName> + <fieldName>Tasks</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityParameter> <name>WorkflowInstanceId_param</name> @@ -183,6 +184,14 @@ </entityParameter> <entityProvider> <name>FinishedInstanceTasks</name> + <documentation>%aditoprj%/entity/WorkflowTask_entity/entityfields/finishedinstancetasks/documentation.adoc</documentation> + <children> + <entityParameter> + <name>OnlyFinishedTasks_param</name> + <valueProcess>%aditoprj%/entity/WorkflowTask_entity/entityfields/finishedinstancetasks/children/onlyfinishedtasks_param/valueProcess.js</valueProcess> + <expose v="false" /> + </entityParameter> + </children> <dependencies> <entityDependency> <name>d5d39281-0183-42fa-960a-01347cddc85a</name> @@ -191,13 +200,6 @@ <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>OnlyFinishedTasks_param</name> - <valueProcess>%aditoprj%/entity/WorkflowTask_entity/entityfields/finishedinstancetasks/children/onlyfinishedtasks_param/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - </children> </entityProvider> <entityParameter> <name>IncludeServiceTasks_param</name> @@ -205,17 +207,17 @@ </entityParameter> <entityConsumer> <name>LinkedObject</name> - <dependency> - <name>dependency</name> - <entityName>ObjectProxy_entity</entityName> - <fieldName>FilteredObjects</fieldName> - </dependency> <children> <entityParameter> <name>Entity_param</name> <valueProcess>%aditoprj%/entity/WorkflowTask_entity/entityfields/linkedobject/children/entity_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>ObjectProxy_entity</entityName> + <fieldName>FilteredObjects</fieldName> + </dependency> </entityConsumer> <entityActionGroup> <name>tableActions</name> diff --git a/entity/WorkflowTask_entity/entityfields/finishedinstancetasks/documentation.adoc b/entity/WorkflowTask_entity/entityfields/finishedinstancetasks/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..9c6e27a4c533764cf77525c919d49975460d37a4 --- /dev/null +++ b/entity/WorkflowTask_entity/entityfields/finishedinstancetasks/documentation.adoc @@ -0,0 +1,3 @@ += FinishedInstanceTasks + +Provides all finished tasks for one process instance. \ No newline at end of file diff --git a/entity/WorkflowTask_entity/entityfields/instancetasks/documentation.adoc b/entity/WorkflowTask_entity/entityfields/instancetasks/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..1d64bc1c9b05d07e6da7b2687f01784fceed7a69 --- /dev/null +++ b/entity/WorkflowTask_entity/entityfields/instancetasks/documentation.adoc @@ -0,0 +1,3 @@ += InstanceTasks + +Provides all active tasks for one workflow instance. \ No newline at end of file diff --git a/entity/WorkflowVariableValue_entity/WorkflowVariableValue_entity.aod b/entity/WorkflowVariableValue_entity/WorkflowVariableValue_entity.aod index df6d2af4a4fbaaefe03d95087d1f7062bfbb4ff3..21b68b882b86779e038b545bdde94320daa33713 100644 --- a/entity/WorkflowVariableValue_entity/WorkflowVariableValue_entity.aod +++ b/entity/WorkflowVariableValue_entity/WorkflowVariableValue_entity.aod @@ -31,6 +31,7 @@ </entityParameter> <entityProvider> <name>VariablesOfInstance</name> + <documentation>%aditoprj%/entity/WorkflowVariableValue_entity/entityfields/variablesofinstance/documentation.adoc</documentation> <dependencies> <entityDependency> <name>b10924d7-0ba4-4268-8b2f-383e7cf6045c</name> diff --git a/entity/WorkflowVariableValue_entity/entityfields/variablesofinstance/documentation.adoc b/entity/WorkflowVariableValue_entity/entityfields/variablesofinstance/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..a65691e2574d4bcb759568834d2154665042a0a9 --- /dev/null +++ b/entity/WorkflowVariableValue_entity/entityfields/variablesofinstance/documentation.adoc @@ -0,0 +1,3 @@ += VariablesOfInstance + +Provides all variables contained in a specific workflow instance. \ No newline at end of file diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index b64642c40167604208f787e532e9aed55b02c56c..46ad514d97d35ba922f8d323e0a7166724251242 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -4971,18 +4971,12 @@ <entry> <key>Has sales approved this step?</key> </entry> - <entry> - <key>"</key> - </entry> <entry> <key>Import Date</key> </entry> <entry> <key>Import Data</key> </entry> - <entry> - <key>;</key> - </entry> <entry> <key>Standard mail</key> </entry> @@ -7389,6 +7383,207 @@ <entry> <key>Channels</key> </entry> + <entry> + <key>Private</key> + </entry> + <entry> + <key>Rechnungsbetrag</key> + </entry> + <entry> + <key>[TEST] Sql_lib - SqlMaskingUtils</key> + </entry> + <entry> + <key>Knowledgebase</key> + </entry> + <entry> + <key>Marketing workflow</key> + </entry> + <entry> + <key>Token</key> + </entry> + <entry> + <key>Edited by</key> + </entry> + <entry> + <key>Sales Project Analyses</key> + </entry> + <entry> + <key>Sales Project Id</key> + </entry> + <entry> + <key>Sales Project Convertion Rates</key> + </entry> + <entry> + <key>Set Campaign Step</key> + </entry> + <entry> + <key>Member</key> + </entry> + <entry> + <key>Tags</key> + </entry> + <entry> + <key>[TEST] Sql_lib - SqlBuilder</key> + </entry> + <entry> + <key>Feed</key> + </entry> + <entry> + <key>[TEST] KeywordAttribute_lib</key> + </entry> + <entry> + <key>Messages</key> + </entry> + <entry> + <key>Channel Name</key> + </entry> + <entry> + <key>Sales Project Phases</key> + </entry> + <entry> + <key>Start workflows</key> + </entry> + <entry> + <key>edited</key> + </entry> + <entry> + <key>Channel</key> + </entry> + <entry> + <key>Import from Teams</key> + </entry> + <entry> + <key>Invitation</key> + </entry> + <entry> + <key>send as mail</key> + </entry> + <entry> + <key>User token</key> + </entry> + <entry> + <key>Team name</key> + </entry> + <entry> + <key>Knowledge Roles</key> + </entry> + <entry> + <key>Valid</key> + </entry> + <entry> + <key>Audit Logs</key> + </entry> + <entry> + <key>Editorial</key> + </entry> + <entry> + <key>KnowledgeRoles</key> + </entry> + <entry> + <key>Remove from Campaign</key> + </entry> + <entry> + <key>Message</key> + </entry> + <entry> + <key>Add members</key> + </entry> + <entry> + <key>[TEST] .All</key> + </entry> + <entry> + <key>Newsfeed (Complete Article)</key> + </entry> + <entry> + <key>Notification</key> + </entry> + <entry> + <key>Load older messages</key> + </entry> + <entry> + <key>Newsletter</key> + </entry> + <entry> + <key>Adds an answer to the selected discussion</key> + </entry> + <entry> + <key>LinkedIn (Person)</key> + </entry> + <entry> + <key>Newsfeed Timeline</key> + </entry> + <entry> + <key>MS Teams</key> + </entry> + <entry> + <key>User tokens</key> + </entry> + <entry> + <key>[TEST] Keyword_lib</key> + </entry> + <entry> + <key>News</key> + </entry> + <entry> + <key>Sales Projects</key> + </entry> + <entry> + <key>Team</key> + </entry> + <entry> + <key>Created by</key> + </entry> + <entry> + <key>Employee count</key> + </entry> + <entry> + <key>Toggles the status of selected discussion between open and closed</key> + </entry> + <entry> + <key>Synchronize documents</key> + </entry> + <entry> + <key>AuditLogs</key> + </entry> + <entry> + <key>Audit Log</key> + </entry> + <entry> + <key>Admin</key> + </entry> + <entry> + <key>Show all audits</key> + </entry> + <entry> + <key>Sales Project milestone Id</key> + </entry> + <entry> + <key>LinkedIn (Organisation)</key> + </entry> + <entry> + <key>[TEST] UnitTest_lib</key> + </entry> + <entry> + <key>Exports the knowledge entry as a html file</key> + </entry> + <entry> + <key>The max participants count can not be equal or less then 0</key> + </entry> + <entry> + <key>Illegal Parent Operator in buildFilterObj-Function:</key> + </entry> + <entry> + <key>My campaigns</key> + </entry> + <entry> + <key>Subcategory</key> + </entry> + <entry> + <key>Campaign costs</key> + </entry> + <entry> + <key>Verantwortlicher</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 b6705c747b8d97012d569724d380b0f814fdb424..2ebdace2b722840bc04f56ab43c54bcbfd083ab2 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -6,6 +6,14 @@ <country></country> <variant></variant> <keyValueMap> + <entry> + <key>The max participants count can not be equal or less then 0</key> + <value>Die maximale Teilnehmerzahl muss größer 0 sein!</value> + </entry> + <entry> + <key>Illegal Parent Operator in buildFilterObj-Function:</key> + <value>Ãœbergebener Operator ungültig in Funktion "buildFilterObj"</value> + </entry> <entry> <key>Probability AI</key> <value>Wahrscheinlichkeit KI</value> @@ -26,6 +34,10 @@ <key>Choose Team</key> <value>Team auswählen</value> </entry> + <entry> + <key>Private</key> + <value>Privat</value> + </entry> <entry> <key>Add app</key> <value>App hinzufügen</value> @@ -6826,7 +6838,7 @@ </entry> <entry> <key>Only .odt files are supported for bulkletters.</key> - <value>Für Serienbriefe werden nur.odt Dateien unterstützt</value> + <value>Für Serienbriefe werden nur .odt Dateien unterstützt</value> </entry> <entry> <key>Show tickets where I am the editor</key> @@ -7893,12 +7905,6 @@ Bitte Datumseingabe prüfen</value> <key>Show only own</key> <value>Nur Eigene anzeigen</value> </entry> - <entry> - <key>"</key> - </entry> - <entry> - <key>;</key> - </entry> <entry> <key>My Workflow Tasks</key> <value>Meine Workflow Aufgaben</value> @@ -8369,6 +8375,10 @@ Bitte Datumseingabe prüfen</value> <key>The radius has to be %0 or lesser.</key> <value>Der Radius muss %0 km oder weniger betragen.</value> </entry> + <entry> + <key>Subcategory</key> + <value>Unterkategorie</value> + </entry> <entry> <key>The radius has to be at least %0.</key> <value>Der Radius muss mindestens %0 km betragen.</value> @@ -9802,6 +9812,199 @@ Bitte Datumseingabe prüfen</value> <key>#login</key> <value>Login Token</value> </entry> + <entry> + <key>Rechnungsbetrag</key> + </entry> + <entry> + <key>[TEST] Sql_lib - SqlMaskingUtils</key> + </entry> + <entry> + <key>Knowledgebase</key> + </entry> + <entry> + <key>Marketing workflow</key> + </entry> + <entry> + <key>Token</key> + </entry> + <entry> + <key>Edited by</key> + </entry> + <entry> + <key>Sales Project Analyses</key> + </entry> + <entry> + <key>Sales Project Id</key> + </entry> + <entry> + <key>Sales Project Convertion Rates</key> + </entry> + <entry> + <key>Set Campaign Step</key> + </entry> + <entry> + <key>Member</key> + </entry> + <entry> + <key>Tags</key> + </entry> + <entry> + <key>[TEST] Sql_lib - SqlBuilder</key> + </entry> + <entry> + <key>Feed</key> + </entry> + <entry> + <key>[TEST] KeywordAttribute_lib</key> + </entry> + <entry> + <key>Messages</key> + </entry> + <entry> + <key>Channel Name</key> + </entry> + <entry> + <key>Sales Project Phases</key> + </entry> + <entry> + <key>Start workflows</key> + <value>Workflows starten</value> + </entry> + <entry> + <key>edited</key> + </entry> + <entry> + <key>Channel</key> + </entry> + <entry> + <key>Import from Teams</key> + </entry> + <entry> + <key>Invitation</key> + </entry> + <entry> + <key>send as mail</key> + </entry> + <entry> + <key>User token</key> + </entry> + <entry> + <key>Team name</key> + </entry> + <entry> + <key>Knowledge Roles</key> + </entry> + <entry> + <key>Valid</key> + </entry> + <entry> + <key>Audit Logs</key> + </entry> + <entry> + <key>Editorial</key> + </entry> + <entry> + <key>KnowledgeRoles</key> + </entry> + <entry> + <key>Remove from Campaign</key> + </entry> + <entry> + <key>Message</key> + </entry> + <entry> + <key>Add members</key> + </entry> + <entry> + <key>[TEST] .All</key> + </entry> + <entry> + <key>Newsfeed (Complete Article)</key> + </entry> + <entry> + <key>Notification</key> + </entry> + <entry> + <key>Load older messages</key> + </entry> + <entry> + <key>Newsletter</key> + </entry> + <entry> + <key>Adds an answer to the selected discussion</key> + </entry> + <entry> + <key>LinkedIn (Person)</key> + </entry> + <entry> + <key>Newsfeed Timeline</key> + </entry> + <entry> + <key>MS Teams</key> + </entry> + <entry> + <key>User tokens</key> + </entry> + <entry> + <key>[TEST] Keyword_lib</key> + </entry> + <entry> + <key>News</key> + </entry> + <entry> + <key>Sales Projects</key> + </entry> + <entry> + <key>Team</key> + </entry> + <entry> + <key>Created by</key> + </entry> + <entry> + <key>Employee count</key> + </entry> + <entry> + <key>Toggles the status of selected discussion between open and closed</key> + </entry> + <entry> + <key>Synchronize documents</key> + </entry> + <entry> + <key>AuditLogs</key> + </entry> + <entry> + <key>Audit Log</key> + </entry> + <entry> + <key>Admin</key> + </entry> + <entry> + <key>Show all audits</key> + </entry> + <entry> + <key>Sales Project milestone Id</key> + </entry> + <entry> + <key>LinkedIn (Organisation)</key> + </entry> + <entry> + <key>[TEST] UnitTest_lib</key> + </entry> + <entry> + <key>Exports the knowledge entry as a html file</key> + </entry> + <entry> + <key>My campaigns</key> + </entry> + <entry> + <key>Subcategory</key> + </entry> + <entry> + <key>Campaign costs</key> + </entry> + <entry> + <key>Verantwortlicher</key> + </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 3580ad96f1974d1004ca593bc9506c270489c792..b1927645977c16fee2d17e2f4586f1b6fe656f5e 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -5048,18 +5048,12 @@ <entry> <key>Has sales approved this step?</key> </entry> - <entry> - <key>"</key> - </entry> <entry> <key>Import Date</key> </entry> <entry> <key>Import Data</key> </entry> - <entry> - <key>;</key> - </entry> <entry> <key>Standard mail</key> </entry> @@ -7470,6 +7464,207 @@ <entry> <key>Channels</key> </entry> + <entry> + <key>Private</key> + </entry> + <entry> + <key>Rechnungsbetrag</key> + </entry> + <entry> + <key>[TEST] Sql_lib - SqlMaskingUtils</key> + </entry> + <entry> + <key>Knowledgebase</key> + </entry> + <entry> + <key>Marketing workflow</key> + </entry> + <entry> + <key>Token</key> + </entry> + <entry> + <key>Edited by</key> + </entry> + <entry> + <key>Sales Project Analyses</key> + </entry> + <entry> + <key>Sales Project Id</key> + </entry> + <entry> + <key>Sales Project Convertion Rates</key> + </entry> + <entry> + <key>Set Campaign Step</key> + </entry> + <entry> + <key>Member</key> + </entry> + <entry> + <key>Tags</key> + </entry> + <entry> + <key>[TEST] Sql_lib - SqlBuilder</key> + </entry> + <entry> + <key>Feed</key> + </entry> + <entry> + <key>[TEST] KeywordAttribute_lib</key> + </entry> + <entry> + <key>Messages</key> + </entry> + <entry> + <key>Channel Name</key> + </entry> + <entry> + <key>Sales Project Phases</key> + </entry> + <entry> + <key>Start workflows</key> + </entry> + <entry> + <key>edited</key> + </entry> + <entry> + <key>Channel</key> + </entry> + <entry> + <key>Import from Teams</key> + </entry> + <entry> + <key>Invitation</key> + </entry> + <entry> + <key>send as mail</key> + </entry> + <entry> + <key>User token</key> + </entry> + <entry> + <key>Team name</key> + </entry> + <entry> + <key>Knowledge Roles</key> + </entry> + <entry> + <key>Valid</key> + </entry> + <entry> + <key>Audit Logs</key> + </entry> + <entry> + <key>Editorial</key> + </entry> + <entry> + <key>KnowledgeRoles</key> + </entry> + <entry> + <key>Remove from Campaign</key> + </entry> + <entry> + <key>Message</key> + </entry> + <entry> + <key>Add members</key> + </entry> + <entry> + <key>[TEST] .All</key> + </entry> + <entry> + <key>Newsfeed (Complete Article)</key> + </entry> + <entry> + <key>Notification</key> + </entry> + <entry> + <key>Load older messages</key> + </entry> + <entry> + <key>Newsletter</key> + </entry> + <entry> + <key>Adds an answer to the selected discussion</key> + </entry> + <entry> + <key>LinkedIn (Person)</key> + </entry> + <entry> + <key>Newsfeed Timeline</key> + </entry> + <entry> + <key>MS Teams</key> + </entry> + <entry> + <key>User tokens</key> + </entry> + <entry> + <key>[TEST] Keyword_lib</key> + </entry> + <entry> + <key>News</key> + </entry> + <entry> + <key>Sales Projects</key> + </entry> + <entry> + <key>Team</key> + </entry> + <entry> + <key>Created by</key> + </entry> + <entry> + <key>Employee count</key> + </entry> + <entry> + <key>Toggles the status of selected discussion between open and closed</key> + </entry> + <entry> + <key>Synchronize documents</key> + </entry> + <entry> + <key>AuditLogs</key> + </entry> + <entry> + <key>Audit Log</key> + </entry> + <entry> + <key>Admin</key> + </entry> + <entry> + <key>Show all audits</key> + </entry> + <entry> + <key>Sales Project milestone Id</key> + </entry> + <entry> + <key>LinkedIn (Organisation)</key> + </entry> + <entry> + <key>[TEST] UnitTest_lib</key> + </entry> + <entry> + <key>Exports the knowledge entry as a html file</key> + </entry> + <entry> + <key>The max participants count can not be equal or less then 0</key> + </entry> + <entry> + <key>Illegal Parent Operator in buildFilterObj-Function:</key> + </entry> + <entry> + <key>My campaigns</key> + </entry> + <entry> + <key>Subcategory</key> + </entry> + <entry> + <key>Campaign costs</key> + </entry> + <entry> + <key>Verantwortlicher</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/neonContext/CampaignParticipant/CampaignParticipant.aod b/neonContext/CampaignParticipant/CampaignParticipant.aod index 503b93a8e3b3e870f039f08335ed0dc5832ddd77..80eda39dc4dbe253de00d07452e67dcbd28658f1 100644 --- a/neonContext/CampaignParticipant/CampaignParticipant.aod +++ b/neonContext/CampaignParticipant/CampaignParticipant.aod @@ -4,7 +4,6 @@ <majorModelMode>DISTRIBUTED</majorModelMode> <filterView>CampaignParticipantFilter_view</filterView> <editView>CampaignParticipantEdit_view</editView> - <previewView>CampaignParticipantPreview_view</previewView> <entity>CampaignParticipant_entity</entity> <references> <neonViewReference> diff --git a/neonContext/MSTTeamMember/MSTTeamMember.aod b/neonContext/MSTTeamMember/MSTTeamMember.aod index 66b94ef39e0e15301f383769c2c539b0b436da6f..bfb06f7c7f593614d9e07e748111ba5c42b7a708 100644 --- a/neonContext/MSTTeamMember/MSTTeamMember.aod +++ b/neonContext/MSTTeamMember/MSTTeamMember.aod @@ -2,13 +2,8 @@ <neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.1"> <name>MSTTeamMember</name> <majorModelMode>DISTRIBUTED</majorModelMode> - <editView>MSTTeamMemberEdit_view</editView> <entity>MSTTeamMember_entity</entity> <references> - <neonViewReference> - <name>5e760ac4-fea0-4283-a0bf-d6d5f0f1c003</name> - <view>MSTTeamMemberEdit_view</view> - </neonViewReference> <neonViewReference> <name>61588d12-3c0d-4181-93ae-90d7ad50ed6b</name> <view>MSTTeamMemberMultiEdit_view</view> diff --git a/neonContext/Offer/Offer.aod b/neonContext/Offer/Offer.aod index e8a6d8d34e56933b89b40bd124432ff6e1a89d0c..271bdfa9b499295cc511d6c1a464eb8afb50a3fd 100644 --- a/neonContext/Offer/Offer.aod +++ b/neonContext/Offer/Offer.aod @@ -44,5 +44,8 @@ <name>136dceaa-0eca-452a-9757-132fd54e8c55</name> <view>OfferPreviewMultiple_view</view> </neonViewReference> + <webserviceReference> + <name>277d4493-9a49-4e68-b00c-29d3d0e0b9d2</name> + </webserviceReference> </references> </neonContext> diff --git a/neonContext/SupportTicket/SupportTicket.aod b/neonContext/SupportTicket/SupportTicket.aod index 5115f0e09bb42d0a96db18a81d8e858ec4705c14..b0233b40612590203cef68266f2313ff595f7974 100644 --- a/neonContext/SupportTicket/SupportTicket.aod +++ b/neonContext/SupportTicket/SupportTicket.aod @@ -4,6 +4,7 @@ <title>Support Ticket</title> <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/neonContext/SupportTicket/documentation.adoc</documentation> + <icon>VAADIN:CHAT</icon> <mainView>SupportTicketMain_view</mainView> <filterView>SupportTicketFilter_view</filterView> <editView>SupportTicketEdit_view</editView> diff --git a/neonDashboard/Home/Home.aod b/neonDashboard/Home/Home.aod index 1c0ccc5e306c4f553765da6e33024c3e674d6899..dc01fbf1ec3b9201eac0bc318ee53f98e8c0a568 100644 --- a/neonDashboard/Home/Home.aod +++ b/neonDashboard/Home/Home.aod @@ -8,7 +8,7 @@ <editRoles /> <defaultDashlets> <neonDashlet> - <name>Dashlet2</name> + <name>AllContactsDashlet</name> <viewName>PersonFilter_view</viewName> <configName>AllContactsDashlet</configName> <uiConfiguration> @@ -20,7 +20,7 @@ </uiConfiguration> </neonDashlet> <neonDashlet> - <name>Dashlet3</name> + <name>AditoTwitterDashlet</name> <viewName>TwitterTimeline_view</viewName> <configName>AditoTwitterDashlet</configName> <uiConfiguration> @@ -32,7 +32,7 @@ </uiConfiguration> </neonDashlet> <neonDashlet> - <name>Dashlet</name> + <name>MytasksDashlet</name> <viewName>TaskFilter_view</viewName> <configName>mytasks</configName> <uiConfiguration> @@ -44,7 +44,7 @@ </uiConfiguration> </neonDashlet> <neonDashlet> - <name>Dashlet4</name> + <name>InformationDashlet</name> <viewName>MyDashboardScoreCard_view</viewName> <configName>Information</configName> <uiConfiguration> @@ -56,7 +56,7 @@ </uiConfiguration> </neonDashlet> <neonDashlet> - <name>Dashlet5</name> + <name>NotificationDashlet</name> <viewName>NotificationFilter_view</viewName> <configName>NotificationDashletConfiguration</configName> <uiConfiguration> diff --git a/neonDashboard/Vertriebsdashboard/Vertriebsdashboard.aod b/neonDashboard/Vertriebsdashboard/Vertriebsdashboard.aod index 870d8ef2f23bf7f719d7a43c0dc70deec2075f06..b6750436bad8af3a5e84c77d972166a4c2977519 100644 --- a/neonDashboard/Vertriebsdashboard/Vertriebsdashboard.aod +++ b/neonDashboard/Vertriebsdashboard/Vertriebsdashboard.aod @@ -11,7 +11,7 @@ </editRoles> <defaultDashlets> <neonDashlet> - <name>Dashlet</name> + <name>KeyFiguresDashlet</name> <viewName>SalesprojectScoreCard_view</viewName> <configName>KeyFigures</configName> <uiConfiguration> @@ -23,7 +23,7 @@ </uiConfiguration> </neonDashlet> <neonDashlet> - <name>Dashlet4</name> + <name>AllOrgsDashlet</name> <viewName>OrganisationFilter_view</viewName> <configName>AllOrgsDashlet</configName> <uiConfiguration> @@ -35,7 +35,7 @@ </uiConfiguration> </neonDashlet> <neonDashlet> - <name>Dashlet2</name> + <name>OpenSalesprojectsDashlet</name> <viewName>SalesprojectFilter_view</viewName> <configName>OpenSalesprojectsDashlet</configName> <uiConfiguration> @@ -47,7 +47,7 @@ </uiConfiguration> </neonDashlet> <neonDashlet> - <name>Dashlet3</name> + <name>SalesprojectPhasesDashlet</name> <viewName>SalesprojectAnalyses_view</viewName> <configName>SalesprojectPhases</configName> <uiConfiguration> @@ -59,7 +59,7 @@ </uiConfiguration> </neonDashlet> <neonDashlet> - <name>Dashlet6</name> + <name>ConvertionRatesDashlet</name> <viewName>SalesprojectConversionRate_view</viewName> <configName>ConvertionRates</configName> <uiConfiguration> @@ -71,7 +71,7 @@ </uiConfiguration> </neonDashlet> <neonDashlet> - <name>Dashlet7</name> + <name>AnalysesChartDashlet</name> <viewName>ActivityAnalyses_view</viewName> <configName>analysesChart</configName> <uiConfiguration> diff --git a/neonView/360DegreeFilter_view/360DegreeFilter_view.aod b/neonView/360DegreeFilter_view/360DegreeFilter_view.aod index 92774253b354b78078799eeddf036328bb43eaab..f214b8b117eec17e871e9246d0cf63ca4e1ddd1a 100644 --- a/neonView/360DegreeFilter_view/360DegreeFilter_view.aod +++ b/neonView/360DegreeFilter_view/360DegreeFilter_view.aod @@ -2,7 +2,7 @@ <neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.7" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.7"> <name>360DegreeFilter_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> - <filterable v="false" /> + <filterable v="true" /> <layout> <groupLayout> <name>layout</name> @@ -10,22 +10,25 @@ </layout> <children> <treeViewTemplate> - <name>Treetable</name> + <name>Tree</name> <favoriteActionGroup2>newModule</favoriteActionGroup2> <titleField>TITLE</titleField> - <descriptionField>DATE</descriptionField> + <descriptionField>DESCRIPTION</descriptionField> <iconField>ICON</iconField> + <hideContentSearch v="false" /> <entityField>#ENTITY</entityField> + <linkedColumns /> <defaultGroupFields> - <element>ENTITY_NAME</element> + <element>GROUP</element> </defaultGroupFields> + <fixedFilterFields /> </treeViewTemplate> <timelineViewTemplate> <name>Timeline</name> <favoriteActionGroup2>newModule</favoriteActionGroup2> - <dateField>DATE</dateField> + <dateField>DATE_NEW</dateField> <titleField>TITLE</titleField> - <descriptionField>ENTITY_NAME</descriptionField> + <descriptionField>GROUP</descriptionField> <iconIdField>ICON</iconIdField> <hideContentSearch v="false" /> <entityField>#ENTITY</entityField> diff --git a/neonView/AnyObjectRelationTree_view0/AnyObjectRelationTree_view0.aod b/neonView/AnyObjectRelationTree_view0/AnyObjectRelationTree_view0.aod deleted file mode 100644 index e6fc96ef835f20a69906295250ac20b9bdaa8076..0000000000000000000000000000000000000000 --- a/neonView/AnyObjectRelationTree_view0/AnyObjectRelationTree_view0.aod +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.7" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.7"> - <name>AnyObjectRelationTree_view0</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <treeViewTemplate> - <name>AnyObjectRelations</name> - <parentField>AnyObjectType</parentField> - <titleField>AnyObjectRowid</titleField> - <entityField>#ENTITY</entityField> - <title></title> - </treeViewTemplate> - </children> -</neonView> diff --git a/neonView/CampaignCostExtendedFilter_view/CampaignCostExtendedFilter_view.aod b/neonView/CampaignCostExtendedFilter_view/CampaignCostExtendedFilter_view.aod index ef68f8add69e1c2538b754152449da9ce7ae5af4..c70e6577f7002cfc7067bd6cdcbd521846aa9ba8 100644 --- a/neonView/CampaignCostExtendedFilter_view/CampaignCostExtendedFilter_view.aod +++ b/neonView/CampaignCostExtendedFilter_view/CampaignCostExtendedFilter_view.aod @@ -13,6 +13,8 @@ <tableViewTemplate> <name>CampaignCost</name> <entityField>#ENTITY</entityField> + <linkedColumns /> + <fixedFilterFields /> <columns> <neonTableColumn> <name>5202d410-fc4d-4109-93b1-8743954a25e2</name> diff --git a/neonView/CampaignCostFilter_view/CampaignCostFilter_view.aod b/neonView/CampaignCostFilter_view/CampaignCostFilter_view.aod index 4962588f3b299536e2697adfaefa0df02e2b2305..61d578cc42cc3ccae4ac3235a1af1c325f67e1ac 100644 --- a/neonView/CampaignCostFilter_view/CampaignCostFilter_view.aod +++ b/neonView/CampaignCostFilter_view/CampaignCostFilter_view.aod @@ -12,6 +12,8 @@ <tableViewTemplate> <name>CampaignCost</name> <entityField>#ENTITY</entityField> + <linkedColumns /> + <fixedFilterFields /> <columns> <neonTableColumn> <name>651c5bd4-8f87-40d4-9d1f-38549b1e5fdf</name> @@ -26,6 +28,9 @@ <treeTableViewTemplate> <name>Treetable</name> <entityField>#ENTITY</entityField> + <linkedColumns /> + <defaultGroupFields /> + <fixedFilterFields /> <columns> <neonTreeTableColumn> <name>9d36a33f-b619-4922-9811-acd73bf67b22</name> diff --git a/neonView/CampaignCostFix_view/CampaignCostFix_view.aod b/neonView/CampaignCostFix_view/CampaignCostFix_view.aod index 710331794c9643264aecd8b4c1332f6c4e46cd04..1576e6582d2caafebc70908b12c23451a0ccafaa 100644 --- a/neonView/CampaignCostFix_view/CampaignCostFix_view.aod +++ b/neonView/CampaignCostFix_view/CampaignCostFix_view.aod @@ -14,6 +14,8 @@ <tableViewTemplate> <name>CampaignCostFix</name> <entityField>#ENTITY</entityField> + <linkedColumns /> + <fixedFilterFields /> <columns> <neonTableColumn> <name>1b2b3ce3-eaff-472b-a873-5e054adac89a</name> diff --git a/neonView/CampaignCostVariable_view/CampaignCostVariable_view.aod b/neonView/CampaignCostVariable_view/CampaignCostVariable_view.aod index cdef7ed10359f12f48c2e7145b9bc330b5407325..babaed199bb42483f9b2aee02481cd8865c43911 100644 --- a/neonView/CampaignCostVariable_view/CampaignCostVariable_view.aod +++ b/neonView/CampaignCostVariable_view/CampaignCostVariable_view.aod @@ -15,9 +15,11 @@ <treeTableViewTemplate> <name>CostTreeTable</name> <entityField>#ENTITY</entityField> + <linkedColumns /> <defaultGroupFields> <element>CAMPAIGNSTEP_ID</element> </defaultGroupFields> + <fixedFilterFields /> <columns> <neonTreeTableColumn> <name>457caff8-0403-425f-839c-62e5d05fe3a1</name> @@ -26,10 +28,12 @@ <neonTreeTableColumn> <name>2adbd887-f1df-43ff-bde9-12c8273af7a9</name> <entityField>NET</entityField> + <aggregateEntityField>NET_aggregate</aggregateEntityField> </neonTreeTableColumn> <neonTreeTableColumn> <name>f8c6439c-9536-477b-af19-26719902e12e</name> <entityField>netPerParticipant</entityField> + <aggregateEntityField>NETPERPARTICIPANT_aggregate</aggregateEntityField> </neonTreeTableColumn> <neonTreeTableColumn> <name>8239e81b-d69c-4ea9-b55d-83e79d1693cf</name> diff --git a/neonView/CampaignMain_view/CampaignMain_view.aod b/neonView/CampaignMain_view/CampaignMain_view.aod index b9c3a7e101e63c8421f6dfe00e74624902ec1288..9c190085b1289d13e896abcf2315afc8a7052d36 100644 --- a/neonView/CampaignMain_view/CampaignMain_view.aod +++ b/neonView/CampaignMain_view/CampaignMain_view.aod @@ -46,11 +46,6 @@ <entityField>Activities</entityField> <view>ActivityFilter_view</view> </neonViewReference> - <neonViewReference> - <name>e28e5598-9366-4f5a-be8f-70dd3cc0399a</name> - <entityField>Tasks</entityField> - <view>TaskFilter_view</view> - </neonViewReference> <neonViewReference> <name>3b87a113-aa39-4d20-8902-ad2a9f6aba5f</name> <entityField>Documents</entityField> diff --git a/neonView/CampaignParticipantEdit_view/CampaignParticipantEdit_view.aod b/neonView/CampaignParticipantEdit_view/CampaignParticipantEdit_view.aod index 72e0dfacaddca1684bb5384ef485def55746dcd5..3c1d934a73af10746e84e1b78b137249a85dcef7 100644 --- a/neonView/CampaignParticipantEdit_view/CampaignParticipantEdit_view.aod +++ b/neonView/CampaignParticipantEdit_view/CampaignParticipantEdit_view.aod @@ -14,6 +14,7 @@ <children> <scoreCardViewTemplate> <name>CampaignStepInfos_Score</name> + <fieldActions /> <entityField>#ENTITY</entityField> <fields> <entityFieldLink> @@ -41,9 +42,13 @@ <entityField>CAMPAIGNSTEP_ID</entityField> </entityFieldLink> <entityFieldLink> - <name>94aa9a4d-e2e5-4a1b-b6f8-4d5aed87fe53</name> + <name>65fd8c83-7990-4109-8a08-5c0c56cb3426</name> <entityField>CONTACT_ID</entityField> </entityFieldLink> + <entityFieldLink> + <name>572ffba6-15c8-4d82-8f78-7e03ca1215ce</name> + <entityField>RESPONSIBLE_CONTACT_ID</entityField> + </entityFieldLink> </fields> </genericViewTemplate> </children> diff --git a/neonView/CampaignParticipantFilter_view/CampaignParticipantFilter_view.aod b/neonView/CampaignParticipantFilter_view/CampaignParticipantFilter_view.aod index b3148ca25c40c1766c434927b0412c484c8a0d82..c37810db65a190013ac7672d37a925b258774bec 100644 --- a/neonView/CampaignParticipantFilter_view/CampaignParticipantFilter_view.aod +++ b/neonView/CampaignParticipantFilter_view/CampaignParticipantFilter_view.aod @@ -15,6 +15,8 @@ <name>ParticipantsTable</name> <favoriteActionGroup1>FilterViewActionGroup</favoriteActionGroup1> <entityField>#ENTITY</entityField> + <linkedColumns /> + <fixedFilterFields /> <isCreatable v="true" /> <isEditable v="true" /> <columns> @@ -24,12 +26,20 @@ </neonTableColumn> <neonTableColumn> <name>0b6dd644-a692-4c1a-9ab7-c38608e63eac</name> - <entityField>CONTACT_ID</entityField> + <entityField>PERSON_CONTACT_ID</entityField> + </neonTableColumn> + <neonTableColumn> + <name>74ef2d05-72d0-4406-915d-0c0facd351c2</name> + <entityField>ORGANISATION_CONTACT_ID</entityField> </neonTableColumn> <neonTableColumn> <name>1649e2e9-e3b3-4a41-960d-39002cb6b2d8</name> <entityField>CAMPAIGNSTEP_ID</entityField> </neonTableColumn> + <neonTableColumn> + <name>19da14e0-31c5-4a2a-9291-d0b5b4bd0fc4</name> + <entityField>RESPONSIBLE_CONTACT_ID</entityField> + </neonTableColumn> <neonTableColumn> <name>20c9aed5-cf30-484b-a68b-c1f6ca0459db</name> <entityField>STANDARD_EMAIL_COMMUNICATION</entityField> @@ -44,6 +54,9 @@ <name>Treetable</name> <favoriteActionGroup1>FilterViewActionGroup</favoriteActionGroup1> <entityField>#ENTITY</entityField> + <linkedColumns /> + <defaultGroupFields /> + <fixedFilterFields /> <columns> <neonTreeTableColumn> <name>9ded1920-58ef-4fc1-ac92-07522c7c06d4</name> @@ -51,12 +64,20 @@ </neonTreeTableColumn> <neonTreeTableColumn> <name>f406134b-b1c3-4fae-9f6d-771827d0fb01</name> - <entityField>CONTACT_ID</entityField> + <entityField>PERSON_CONTACT_ID</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>4c485b2e-bf95-4205-8e01-bcf4edbc5a03</name> + <entityField>ORGANISATION_CONTACT_ID</entityField> </neonTreeTableColumn> <neonTreeTableColumn> <name>c7831772-15e4-49bb-ba84-647136c3002e</name> <entityField>CAMPAIGNSTEP_ID</entityField> </neonTreeTableColumn> + <neonTreeTableColumn> + <name>8c5c3311-0127-4977-af27-8ab582d08733</name> + <entityField>RESPONSIBLE_CONTACT_ID</entityField> + </neonTreeTableColumn> <neonTreeTableColumn> <name>664cb6d0-48f9-48bf-9934-2fdb40501771</name> <entityField>STANDARD_EMAIL_COMMUNICATION</entityField> diff --git a/neonView/CampaignStepFilter_view/CampaignStepFilter_view.aod b/neonView/CampaignStepFilter_view/CampaignStepFilter_view.aod index f8ace2f468b1690b8bb6df8dde445e93bdb20fe8..98348e6043ac3b302394c2f486bc72bb0ab7b46a 100644 --- a/neonView/CampaignStepFilter_view/CampaignStepFilter_view.aod +++ b/neonView/CampaignStepFilter_view/CampaignStepFilter_view.aod @@ -4,7 +4,7 @@ <title>Campaign steps </title> <description></description> <majorModelMode>DISTRIBUTED</majorModelMode> - <filterable v="false" /> + <filterable v="true" /> <layout> <groupLayout> <name>layout</name> @@ -13,7 +13,6 @@ <children> <tableViewTemplate> <name>StepsTable</name> - <inlineEdit v="true" /> <entityField>#ENTITY</entityField> <isEditable v="true" /> <autoNewRow v="true" /> @@ -30,6 +29,10 @@ <name>d9ca59de-1441-494a-91f0-1cff91c575de</name> <entityField>NAME</entityField> </neonTableColumn> + <neonTableColumn> + <name>166b2a17-1142-4c1d-b403-362afb227469</name> + <entityField>PREDECESSORSTEP_ID</entityField> + </neonTableColumn> <neonTableColumn> <name>75d15a06-1591-4f5c-9be6-df98e32e3834</name> <entityField>EMPLOYEE_CONTACT_ID</entityField> diff --git a/neonView/CampaignStepMembers_view/CampaignStepMembers_view.aod b/neonView/CampaignStepMembers_view/CampaignStepMembers_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..7d6034293b0612529866b976b55d6bd4c6843080 --- /dev/null +++ b/neonView/CampaignStepMembers_view/CampaignStepMembers_view.aod @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>CampaignStepMembers_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <noneLayout> + <name>layout</name> + </noneLayout> + </layout> +</neonView> diff --git a/neonView/CampaignStepsGantt_view/CampaignStepsGantt_view.aod b/neonView/CampaignStepsGantt_view/CampaignStepsGantt_view.aod index 78d9814225f60838dd799e3ba8fa468e1537592d..1931907f2f4af939eeee74134d9146d38118205f 100644 --- a/neonView/CampaignStepsGantt_view/CampaignStepsGantt_view.aod +++ b/neonView/CampaignStepsGantt_view/CampaignStepsGantt_view.aod @@ -2,7 +2,6 @@ <neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.7" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.7"> <name>CampaignStepsGantt_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> - <filterable v="true" /> <layout> <noneLayout> <name>layout</name> diff --git a/neonView/KnowledgeLinkMultiEdit_view/KnowledgeLinkMultiEdit_view.aod b/neonView/KnowledgeLinkMultiEdit_view/KnowledgeLinkMultiEdit_view.aod index 7d227e4aedf2c4b1330ddff0ab938f2d3316c1e0..10006b4dc77078fdccc2f2ed356ea73057fe9f7a 100644 --- a/neonView/KnowledgeLinkMultiEdit_view/KnowledgeLinkMultiEdit_view.aod +++ b/neonView/KnowledgeLinkMultiEdit_view/KnowledgeLinkMultiEdit_view.aod @@ -13,7 +13,7 @@ <genericMultipleViewTemplate> <name>MultiEdit</name> <entityField>#ENTITY</entityField> - <title>Verknüpfungen</title> + <title>Links</title> <columns> <neonGenericMultipleTableColumn> <name>eb1bc3cb-3cf0-479c-901f-906a7ddde485</name> diff --git a/neonView/KnowledgeManagementDetails_view/KnowledgeManagementDetails_view.aod b/neonView/KnowledgeManagementDetails_view/KnowledgeManagementDetails_view.aod index 76016ffd8298118c6f3a7375fd4aa6bc8aedd868..0cd4bf137430b421db8c12326956979a1ae433bf 100644 --- a/neonView/KnowledgeManagementDetails_view/KnowledgeManagementDetails_view.aod +++ b/neonView/KnowledgeManagementDetails_view/KnowledgeManagementDetails_view.aod @@ -22,7 +22,7 @@ <objectType>KNOWLEDGEMANAGEMENT_OBJECTTYPE</objectType> <rowId>#UID</rowId> <entityField>#ENTITY</entityField> - <title>Favoriten</title> + <title>Favorites</title> </favoriteViewTemplate> <genericViewTemplate> <name>Details</name> diff --git a/neonView/KnowledgeManagementLookup_view/KnowledgeManagementLookup_view.aod b/neonView/KnowledgeManagementLookup_view/KnowledgeManagementLookup_view.aod index 4117b0b5a161f3324a36f082f702f926c165db4f..5c6be963d83b75afffdc663d7598c8b19babb87e 100644 --- a/neonView/KnowledgeManagementLookup_view/KnowledgeManagementLookup_view.aod +++ b/neonView/KnowledgeManagementLookup_view/KnowledgeManagementLookup_view.aod @@ -16,10 +16,6 @@ <name>5a7ab4ba-48a5-47bf-95e9-5631938af5b2</name> <entityField>#IMAGE</entityField> </neonTableColumn> - <neonTableColumn> - <name>b715bc0e-a6b7-478d-9aaf-9bc212812650</name> - <entityField>ViewKnowledgeNumber</entityField> - </neonTableColumn> <neonTableColumn> <name>4176e200-836f-475c-bc35-ae9c27bf1ed9</name> <entityField>TITLE</entityField> diff --git a/neonView/MSTTeamMemberEdit_view/MSTTeamMemberEdit_view.aod b/neonView/MSTTeamMemberEdit_view/MSTTeamMemberEdit_view.aod deleted file mode 100644 index b225944fe7ccaf7d0888054552d98bcb1eddbc57..0000000000000000000000000000000000000000 --- a/neonView/MSTTeamMemberEdit_view/MSTTeamMemberEdit_view.aod +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> - <name>MSTTeamMemberEdit_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <size>SMALL</size> - <layout> - <noneLayout> - <name>layout</name> - </noneLayout> - </layout> - <children> - <genericViewTemplate> - <name>Generic</name> - <editMode v="true" /> - <entityField>#ENTITY</entityField> - <fields> - <entityFieldLink> - <name>0c013cb6-6a74-47c1-9e5c-8e23f1ce917a</name> - <entityField>UPNSOFMEMBERS</entityField> - </entityFieldLink> - <entityFieldLink> - <name>54cf4c2d-6c18-4c0f-ae52-32c1f7337cd7</name> - <entityField>ARETHESEOWNERS</entityField> - </entityFieldLink> - <entityFieldLink> - <name>75b97952-da9a-4a5c-9bbf-6cec3774541b</name> - <entityField>MAILSOFEXTERN</entityField> - </entityFieldLink> - <entityFieldLink> - <name>ab1ed6fe-5a68-4728-9d90-698636c93ce8</name> - <entityField>EXTERN</entityField> - </entityFieldLink> - </fields> - </genericViewTemplate> - </children> -</neonView> diff --git a/neonView/MSTTeamMemberMultiEdit_view/MSTTeamMemberMultiEdit_view.aod b/neonView/MSTTeamMemberMultiEdit_view/MSTTeamMemberMultiEdit_view.aod index 7b50927fe8a7033ca1bf883cebd926def169600b..ec552dc14c2183eded087d2c4bd16b96b48f811c 100644 --- a/neonView/MSTTeamMemberMultiEdit_view/MSTTeamMemberMultiEdit_view.aod +++ b/neonView/MSTTeamMemberMultiEdit_view/MSTTeamMemberMultiEdit_view.aod @@ -24,6 +24,18 @@ <name>b85c25c8-09dd-4f9a-b0b4-31c0b8a8f12c</name> <entityField>INVITE</entityField> </neonGenericMultipleTableColumn> + <neonGenericMultipleTableColumn> + <name>82cdb323-6c1a-428f-a01e-e29da9f338ec</name> + <entityField>AZUREID</entityField> + </neonGenericMultipleTableColumn> + <neonGenericMultipleTableColumn> + <name>3f766fe4-119d-40df-b071-b7a578af2a71</name> + <entityField>AZUREUPN</entityField> + </neonGenericMultipleTableColumn> + <neonGenericMultipleTableColumn> + <name>0b3ac2a1-91ad-4761-9a1d-7231d5b55169</name> + <entityField>ISEXTERN</entityField> + </neonGenericMultipleTableColumn> </columns> </genericMultipleViewTemplate> </children> diff --git a/neonView/MSTeamsDocumentEdit_view/MSTeamsDocumentEdit_view.aod b/neonView/MSTeamsDocumentEdit_view/MSTeamsDocumentEdit_view.aod index 058045a091b32518d162906e8a76b9a356fc7e97..c13a80654c3c766b980b8ebe87ac4a1aa97b2879 100644 --- a/neonView/MSTeamsDocumentEdit_view/MSTeamsDocumentEdit_view.aod +++ b/neonView/MSTeamsDocumentEdit_view/MSTeamsDocumentEdit_view.aod @@ -14,7 +14,7 @@ <name>Documents</name> <editMode v="true" /> <entityField>#ENTITY</entityField> - <title>Dokumente</title> + <title>Documents</title> <fields> <entityFieldLink> <name>6b122227-6e23-4f25-b66c-05f90e991005</name> diff --git a/neonView/NotificationFilter_view/NotificationFilter_view.aod b/neonView/NotificationFilter_view/NotificationFilter_view.aod index 06f0c1d66adbea9ad6562274a4034913c6c5bd0c..9e1d0f42f38202cf07d20df264743e304c0b779b 100644 --- a/neonView/NotificationFilter_view/NotificationFilter_view.aod +++ b/neonView/NotificationFilter_view/NotificationFilter_view.aod @@ -32,7 +32,7 @@ <dateField>CREATEDAY</dateField> <titleField>CAPTION</titleField> <descriptionField>DESCRIPTION</descriptionField> - <subdescriptionField>CREATEDATE</subdescriptionField> + <subdescriptionField>SUBCATEGORY</subdescriptionField> <iconIdField>ICON</iconIdField> <additionalInfoField>STATE</additionalInfoField> <entityField>#ENTITY</entityField> @@ -50,6 +50,7 @@ <entityField>#ENTITY</entityField> <isEditable v="false" /> <isSaveable v="false" /> + <informationField>SUBCATEGORY</informationField> <columns> <neonTableColumn> <name>1cff3be1-523d-4a5a-b7d1-389d7cbb726f</name> @@ -67,6 +68,10 @@ <name>ff33a6c1-7ac6-4acd-a083-e56a36f89977</name> <entityField>DESCRIPTION</entityField> </neonTableColumn> + <neonTableColumn> + <name>0e3756eb-05f6-4ab2-a6e9-984f5215f542</name> + <entityField>SUBCATEGORY</entityField> + </neonTableColumn> <neonTableColumn> <name>5cb09de4-4413-41e5-8a7c-4970a3cf6a62</name> <entityField>STATE</entityField> @@ -95,6 +100,10 @@ <name>446c3d62-efa4-4f1a-85d4-e4f6a45019c7</name> <entityField>DESCRIPTION</entityField> </neonTreeTableColumn> + <neonTreeTableColumn> + <name>6caff937-2e67-4b28-b630-ae1dd5860f3b</name> + <entityField>SUBCATEGORY</entityField> + </neonTreeTableColumn> <neonTreeTableColumn> <name>4c82b79e-4c15-4298-bfbb-186c76fc5189</name> <entityField>STATE</entityField> diff --git a/others/genJsdoc.bat b/others/genJsdoc.bat deleted file mode 100644 index db0775bbbb307e47f3b77efabb48da3851945d61..0000000000000000000000000000000000000000 --- a/others/genJsdoc.bat +++ /dev/null @@ -1,3 +0,0 @@ -SET mypath=%~dp0 - -jsdoc -r %mypath:~0,-1%\..\process -d %mypath:~0,-1%\jsdocOut \ No newline at end of file diff --git a/others/guide/CodingGuidelines.adoc b/others/guide/CodingGuidelines.adoc deleted file mode 100644 index 7fbd1bf92c5ecca6d93d8ffe076b933618cb861b..0000000000000000000000000000000000000000 --- a/others/guide/CodingGuidelines.adoc +++ /dev/null @@ -1,8 +0,0 @@ -= Sample Document -Doc Writer <doc.writer@asciidoc.org>; John Smith <john.smith@asciidoc.org> -v1.0, 2013-05-20: First draft -:title: Sample Document -:tags: [document, example] - - -Preamble... diff --git a/others/guide/CreateJsDoc.adoc b/others/guide/CreateJsDoc.adoc deleted file mode 100644 index d428b85c65aabfc70a1247a8a3a2e443811d571d..0000000000000000000000000000000000000000 --- a/others/guide/CreateJsDoc.adoc +++ /dev/null @@ -1,40 +0,0 @@ -How to build js-doc out of the lib-comments -=========================================== -:toc2: left -:numbered: - -== installation == -1. Nodejs: -https://nodejs.org/en/ -LTS-version (aktuell 10.15.0) - -download and install - -2. install jsdoc - -open CMD -[source] ----- -npm install -g jsdoc ----- - -== generate jsdoc == - -=== manually === -1. open CMD -2. navigate into the project-folder. e.g. -[source] ----- -C: -cd C:\Users\M.Mustermann\Documents\AditoProjects\xRM-Basic5.1 ----- -3. run command -[source] ----- -jsdoc -r process -d others\jsdocOut ----- -4. Open others\jsdocOut\index.html with a webbrowser - -=== with script in designer (Windows) === -1. In the Designer right click on others\genJsdoc.bat -> "Open in System" -2. Right click on others\jsdocOut\index.html -> "View" \ No newline at end of file diff --git a/others/guide/Loghistory.adoc b/others/guide/Loghistory.adoc deleted file mode 100644 index 6a2f284bf89acfae821ba92a33e572343952c9f3..0000000000000000000000000000000000000000 --- a/others/guide/Loghistory.adoc +++ /dev/null @@ -1,87 +0,0 @@ -configure Loghistory -==================== -:DATA_ALIAS: Data_alias -:EDITOR_ALIAS_DEFINITION: AliasDefinition-Editor - -== the concept == -//TODO: extend the concept description -Stoarge: Database-table: `AB_LOGHISTORY` - -Collecting Data: ----- -Audit -> process_audit -> Loghistory_lib: LogHistoryExecutor ----- - -Data is collected and pre-translated. Therefor only one Language can be applied for logging. -Because the loghistory is written via the auditing, only changes that are done with the proper Jdito-Methods will be logged. - -== prerequisites == - -Auditing has to be activated for all tables you want to log. - -.prerequisites of enabling Audit in general -* Auditing has to be enabled in your Server -* Auditing has to be enabled for your alias (default: +{DATA_ALIAS}+) -* Tables that shall be logged need some configs in the _{EDITOR_ALIAS_DEFINITION}_ -** property `idColumn` has to be set (a primary key is needed therefore) -** `auditMode` has to be set -Standard, -CLOB, or -BLOB (chosse the one you really need) - - -== activate writing into loghistory == - -Assuming that the - -* required database-tables exist -* JDito-processes already exist -* audit has been activated in general - -you are ready to configure _which_ column shall be logged and _how_. - -=== configure columns for logging === - -There are several properties (custom and pre-exisiting) that can be set for configuring the logging: - -.configuration options per column -[options="header"] -|======= -|property |purpose |property-type -|+title+ |text that is used to display which column has been modified|pre-exisiting -|+log+ |defines whether a column needs to be logged or not; not exisisting equals `false` |custom: Booelan -|+tableRef+ |references table for automatically grouping data. This is usefull for ForeignKeys, e.g. a +OFFERITEM.OFFER_ID+ column could have a +tableRef+ "OFFER"|custom: String -|+primaryKey+ |this is not only used to enable auditing generally, but it's used to resolve +tableRef+ values correctly|pre-exisiting -|+keyword+ |defines a keyword contianer that should be used to transform a +KEYID+ into a display value|custom: String -|+autoMapTrueFalse4Log+ |if `true` the loghistory-executor tries to automatically translate a value into a "yes"/"no"-display value|custom: Booelan -|+translate4Log+ |defines a process to transform a technical value into a display value |custom: JDito -|======= - -+translate4Log+ is a mighty possibility to translate a ID-value into a displayvalue. However, you should keep several important things in mind: - -* translate text if necessary via the locale-parameter -* the process is called each time a change to that column is applied - keep it fast and simple - -.translate4Log example (skip imports for better readability) -[source,javascript] ----- -var params = Translate4LogParams.load();// <1> -var countryName = CountryUtils.getLatinNameByIso2(params.value, params.locale); // <2> -result.string(countryName);// <3> ----- -<1> load the parameters in a easy and fail-proof way -<2> locale is passed to the resolving function and in that function a translation is applied -<3> always return a string - -=== configure a consumer for retrieving the loghistory === - -.Exampel for the +tablenames_param+ process ----- -import("system.vars"); -import("system.result"); -import("Context_lib"); - -var res = []; -res.push({id: vars.get("$field.CONTACTID"), tableNames: ["CONTACT", "COMMUNICATION", "ADDRESS", "AB_ATTRIBUTERELATION"]}); -res.push({id: vars.get("$field.PERSONID"), tableNames: ["PERSON"]}); - -res = JSON.stringify(res);//currently only strings can be passed as param -result.object(res); ----- \ No newline at end of file diff --git a/others/guide/PersonOrganisationContact.adoc b/others/guide/PersonOrganisationContact.adoc deleted file mode 100644 index 7d7a1b33f971b107ef28b8f4a6a5885a9e10a3f5..0000000000000000000000000000000000000000 --- a/others/guide/PersonOrganisationContact.adoc +++ /dev/null @@ -1,39 +0,0 @@ -Person, Organisation, Contact -============================= -:toc2: left -:numbered: - -== Differences to old Adito == - -The old Adito basic had: - -- Pers -- Org -- Relation - -They are not gone, just renamed: - -- Pers = Person -- Org = Organisation -- Relation = Contact - -TODO: doku erweitern -erson, Organisation, Contact -=========================================== -:toc2: left -:numbered: - -== Differences to old Adito == - -The old Adito basic had: - -- Pers -- Org -- Relation - -They are not gone, just renamed: - -- Pers = Person -- Org = Organisation -- Relation = Contact - diff --git a/others/guide/ProviderConsumerParameter.adoc b/others/guide/ProviderConsumerParameter.adoc deleted file mode 100644 index ee9ff59bc7d051dc069cd0ba1a409887036f8f8c..0000000000000000000000000000000000000000 --- a/others/guide/ProviderConsumerParameter.adoc +++ /dev/null @@ -1,92 +0,0 @@ -Provider - Consumer -=================== -:toc2: left -:numbered: - -=== Provider === -Is the old dfi. - -==== Purpose ==== -The provider provides access to an entity. -You can get data of another entity by connecting a consumer to a provider. - -==== Naming ==== -The names should provide information about *what the provider provides*. - -For example: -Communication_entity has 3 providers: - -- *AllCommunications* -- *EmailCommunications* -- *PhoneCommunications* - -If you connect to *AllCommunications* you get *all* communication types of a contact. -If you connect to *EmailCommunications* you get *only the Email* communication type of a contact. -If you connect to *PhoneCommunications* you get *only the Phone* communication type of a contact. - -*Important:* -*Do not always create a new provider when connecting a new entity. Maybe you can use an already existing provider.* -*Try to reuse providers if you need similar data for two dependencies* - -=== Consumer === -Is the old dfo. - -=== Purpose === -The Consumer *consumes* the data a provider provides. -It can be connected to a provider and fill the parameters of the provider. - -=== Naming === -Most of the time you get a list of "something" so you should call it the plural of what you get. - -Example: -Persons -Organisations - -If you have two Consumer to the same Entity, you should use speaking names. - -Example: -Documents (e.g. for all documents of a person) -MainDocuments (e.g. for only the main documents of a person) - -If you know you get only one row, you can use the singular. - -Example: -Person - -=== Parameter === -Parameters provide a way to tell a provider *what exactly you need*. - -==== Properties ==== -The most important properties are -code, exposed, triggerRecalculation and mandatory - -Parameters work with a fallback mechanism. -This means that if you set the code on the parameter directly then this is executed *only if you did not* provide the code on the parameter at the *provider* and/or *consumer*. -Likewise if you set the code on a parameter at the provider it will only be executed if a *consumer* which connects to this provider *has no code set* at the parameter. - -Here some examples for the *code* property: - -[options="header"] -|======================================================================================================================================================================================================================================================== -| Parameter | Provider | Consumer | Result | Notes -| default | default | default | Nothing executed | -| default | default | code set | Code from consumer executed | This is the mostly used scenario. -| default | code set | default | Code from provider executed | This is used if you need a default value for a parameter which is different on each provider. e.g. used by the Document_entity to determine if it should show main documents or not. -| code set | default | default | Code from parameter executed | -|======================================================================================================================================================================================================================================================== - -The checkbox-parameters can have *three* states: default, checked, unchecked. Default means the property is *gray* and the value from the previous instance is used. Checked and unchecked overwrite always the previous instance. - -The exposed property is a way to decide if a parameter should be visible by the next instance -Here some examples for the *exposed* property: - -[options="header"] -|======================================================================================================================================================== -| Parameter | Provider | Result | Notes -| default | default | NOT Exposed | because the default for exposed is: NOT exposed. -> the parameter won't be visible on the provider and consumer! -| set | set | Exposed | This means that the parameter can be set by the consumer. -| set | UNset | NOT Exposed | This will disable the parameter for one specific provider. -| set | default | Exposed | -|======================================================================================================================================================== - -*Note that there are currently (13.02.2019) some bugs and the handling of parameters with the default #PROVIDER may change.* \ No newline at end of file diff --git a/others/guide/TargetContext.adoc b/others/guide/TargetContext.adoc deleted file mode 100644 index 1d466a0da9c53953491cf301711f745d6d8478e4..0000000000000000000000000000000000000000 --- a/others/guide/TargetContext.adoc +++ /dev/null @@ -1,19 +0,0 @@ -Target Context -============== - -toc2: left -:numbered: - -== What? == -The target context is for forwarding the preview and the klick-action to another context. - -== Why? == -For example the ObjectRelation entity uses this feature to open the linked object directly. - -== Where? == -It is configured by two properties of the providers. - -* targetContextField -* targetIdField - -You can provide an entity-field for each of them which contains the contextId (currently the contextName 13.02.2019) and the rowId (UID) which should be used to open the preview or main view. \ No newline at end of file diff --git a/others/guide/how to write JDito code.adoc b/others/guide/how to write JDito code.adoc deleted file mode 100644 index 9dbbdb19d290d4cffad377c7a19ea1354a52d536..0000000000000000000000000000000000000000 --- a/others/guide/how to write JDito code.adoc +++ /dev/null @@ -1,261 +0,0 @@ -How to wirte JDito code -======================= -:toc2: left -:numbered: - -== basics == -* Keep everything english. Every title, caption, messages, comments, etc. should be english. Add german translation to the languages if necessary. -* in JavaScript-Strings use `"` instead of `'` - even if its only 1 character. `'` is for SQL (within JS-Strings) -* Parameters should start with p. - -== code structure == -=== vars and others (var, let) === -* avoid `let` as much as possible because you cannot debug these variables - -=== brackets === -* `{` are placed on a new line - -Example: -[source,javascript] ----- -for (i = 0, i < dataLen; i++) -{ - //code here -} - -myArray.forEach(function(pItem) -{ - // Do something -}); ----- - -=== loops === -nested loops should be defined with replicated indexer variables. -Therefore it's easy to see in which level of the counter you are. -Even better would be a good and describing name. - -Example: -[source,javascript] ----- -for (i = 0, i < dataLen; i++) -{ - for (ii = 0, ii < dataLen[i].length; ii++) - { - //code... - } -} - -for (row = 0, row < dataLen; row++) -{ - for (col = 0, col < dataLen[row].length; col++) - { - //code... - } -} ----- - - -== Functions - overview of different "types" == -This sections covers how to define different "types" of functions in libraries. - -=== by using static methods === -This will be mostly utility functions where there is no need to instantiate an object. You'll need this probably the most time. - --> Static object with static functions. - - -Definition: -[source,javascript] ----- -/** - * provides static methods for validation of communication data - * do not create an instance of this - * @static - * @class - */ -function CommValidationUtil(){}<1> - -/** - * returns a blueprint for validation extensions; these extensions are needed for validating comm data and can be passed to other functions - * @return {object} a object with properties that have a specific default value; normally you want to overwrite that value - */ -CommValidationUtil.getExtensionsBlueprint = function() <2> -{ - return { - countryCode: null - }; -} ----- -<1> the function-object that keeps everything together - this function should never be actually called (no direct call, no indirect call) -<2> an actual function that can be called - -And how to use it: -[source,javascript] ----- -import("Comm_lib"); - -var additionals = CommValidationUtil.getExtensionsBlueprint(); ----- - -=== by creating an object with functions === - -You may want to hold data and create objects where methods share that data. - -Here is an example for an object that can be created: -[source,javascript] ----- -/** - * object that provides featrues for a single keyword attribute; initalizes itself on creation with a specific keyword-attribute - * - * @param {String} pContainerName specifies the type of the keyword and therefore the list elements; - * e.g. "COUNTRY"; use an entry of the $KeywordRegistry here - * @param {String} pAttributeName the name of the keyword attribute that shall be initalized - * @param {String} [pDefault=undefined] the default value -> Does not throw an error, if default value exists. - * - * @class - */ -function KeywordAttribute(pContainerName, pAttributeName, pDefault) -{ - this.container = pContainerName; - this.attribute = pAttributeName; - this.defaultValue = pDefault; - - var keywordAttrData = newSelect("AB_KEYWORD_ATTRIBUTE.AB_KEYWORD_ATTRIBUTEID, AB_KEYWORD_ATTRIBUTE.KIND") - .from("AB_KEYWORD_ATTRIBUTE") - .where("AB_KEYWORD_ATTRIBUTE.CONTAINER", pContainerName) - .and("AB_KEYWORD_ATTRIBUTE.NAME", pAttributeName) - .arrayRow(); - - if (keywordAttrData.length > 0) - { - this.id = keywordAttrData[0]; - this.type = keywordAttrData[1]; - this.dbField = this.type.trim(); - } - else if(pDefault == undefined) - { - throw new Error(translate.withArguments("no keyword attribute \"%0\" found in keyword container \"%1\"", [this.attribute, this.container])); - } -} - -/** - * get the value for a specific keyId. - * Error if the keyword container does not have the attribute at all (you can check this with .exists()) - * Error if the attribute does not exist at the provided keyId and you have not specified a default - * - * @param {String} pKeyId the keyId - * - * @return {String} the loaded value (or the default) - */ -KeywordAttribute.prototype.getValue = function(pKeyId) -{ - if (this.exists()) - { - var attrValue = newSelect(this.dbField) - .from("AB_KEYWORD_ENTRY") - .join("AB_KEYWORD_ATTRIBUTERELATION", "AB_KEYWORD_ENTRY.AB_KEYWORD_ENTRYID = AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ENTRY_ID") - .where("AB_KEYWORD_ENTRY.CONTAINER", this.container) - .and("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ATTRIBUTE_ID", this.id) - .and("AB_KEYWORD_ENTRY.KEYID", pKeyId) - .cell(); - - if (attrValue) - return attrValue; - - if (this.defaultValue) - return this.defaultValue; - - throw new Error(translate.withArguments("no keyword attribute \"%0\" found in keyword \"%1\" from container \"%2\"", [this.attribute, pKeyId, this.container])); - } - else if (this.defaultValue == undefined) - throw new Error(translate.withArguments("no keyword attribute \"%0\" found in keyword container \"%1\"", [this.attribute, this.container])); - else - return this.defaultValue; -} - -/** - * get a SqlBuilder object for this keyword attribute. You can easily add additional conditions to it. - * - * @return {SqlBuilder} a SqlBuilder which contains a select for the entry-id's, joins to entry and attribute - * and conditions for the container and the attribute-name. - */ -KeywordAttribute.prototype.getSqlBuilderSelect = function() -{ - return newSelect("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ENTRY_ID") - .from("AB_KEYWORD_ATTRIBUTERELATION") - .join("AB_KEYWORD_ENTRY", "AB_KEYWORD_ENTRYID = AB_KEYWORD_ENTRY_ID", "attrEntry") - .join("AB_KEYWORD_ATTRIBUTE", "AB_KEYWORD_ATTRIBUTEID = AB_KEYWORD_ATTRIBUTE_ID") - .where(["AB_KEYWORD_ENTRY", "CONTAINER", "attrEntry"], this.container) - .and("AB_KEYWORD_ATTRIBUTE.NAME", this.attribute) -} - -/** - * check if the Container can have the attribute. - * @return {Boolean} true if it exists, false if not - */ -KeywordAttribute.prototype.exists = function() -{ - return this.id != undefined && this.type != undefined && this.dbField != undefined; -} - ----- - -=== private functions === - - -Private functions would be possible but make everything much more complicate. -So just start your functions / methods name with a _ if you need private methods. - ---> do not use functions which start with a _ outside of the class! - -Add @ignore to the comment of those functions to prevent showing them in the generated jsdoc. - -== JS-Doc == - -<1> JS-Doc comment: http://usejsdoc.org/ -<2> jsdoc-blocks have to start with /** otherwise JSDoc cannot generate a documentation -<3> use the correct form for optional/required parameters: http://usejsdoc.org/tags-param.html -Optional parameter: [alias=the current alias] -Required parameter: alias -Classes: @class -[source,javascript] ----- -/** - * Description... - * ... - * - * @param {String} [pAlias=the current alias] the database alias where the condition shall be executed later (important for column types of preparedStatements) - * @example Here is an example - * @class - */ -function SqlCondition(pAlias) -{ -... -} ----- -<4> examples are useful on more complex functions -<5> constructor function; init properties (do not set functions ("methods") here!) -<6> add functions ("methods") to the prototype, they are available through the prototype chain - -And how to use it (normally you'd want to use preparedStatements but for the sake of an easy example it's a bit shorter here) -See also HowToSqlConditionLib.adoc for a full documentation. -[source,javascript] ----- -import("system.vars"); -import("system.result"); -import("Sql_lib"); -import("Comm_lib"); - -var cond = new SqlCondition(); - -var mediumIds = CommExtensions.getContextualMediumIds(); -if (mediumIds.length > 0) - cond.and("COMM.MEDIUM_ID in (" + mediumIds.join(", ") + ")"); - -var idVal = vars.get("$local.idvalue"); -if (uids.length > 0) - cond.and("COMM.COMMID = '" + idVal + "' "); - -result.string(cond.toString("COMM.OPTIONAL = 't'")); ----- - diff --git a/others/guide/instanceableLibExample.adoc b/others/guide/instanceableLibExample.adoc deleted file mode 100644 index 66dfc0a312e467be87afcf97921691c4e8f61090..0000000000000000000000000000000000000000 --- a/others/guide/instanceableLibExample.adoc +++ /dev/null @@ -1,62 +0,0 @@ -= Example for a instanceable Lib = -:toc2: left -:numbered: - -Remember to always change the comments to fit your class! + -Use speaking names for ALL variables, classes and functions! - -[source,javascript] ----- -import("..."); - -/** - * instanceable example Utility class; - * - * @param {String} pParam1 is for ... - * - * @example var myUtil = new UtilClass("-"); - * @class - */ -function UtilClass(pParam1) -{ - // here is the constructor. - // create class variables like this: - this.myVariable = pParam1; -} - -/** - * a public function - * - * @param {String} pParam1 is for ... - * @param {String} pParam2 is for ... - * - * @example var myResult = myUtil.myFunction("p1", "p2"); - * - * @return {String} a result - */ -UtilClass.prototype.myFunction = function(pParam1, pParam2) -{ - return this._privateStaticFunction1(pParam1, pParam2, this.myVariable); -} - -/** - * a private function - * - * @param {String} pParam1 is for ... - * @param {String} pParam2 is for ... - * @param {String} pParam3 is for ... - * - * @return {String} a result - * @ignore - */ -UtilClass.prototype._myPrivateFunction = function(pParam1, pParam2, pParam3) -{ - if(pParam1 && pParam2 && pParam3) - { - ... - return pParam1 + pParam3 + pParam2; - } - - return ""; -} ----- \ No newline at end of file diff --git a/others/guide/staticLibExample.adoc b/others/guide/staticLibExample.adoc deleted file mode 100644 index d48e2eba91fc0a15fd515826424dbf631ede54e4..0000000000000000000000000000000000000000 --- a/others/guide/staticLibExample.adoc +++ /dev/null @@ -1,57 +0,0 @@ -= Example for a static Lib = -:toc2: left -:numbered: - -Remember to always change the comments to fit your class! + -Use speaking names for ALL variables, classes and functions! - -[source,javascript] ----- -import("..."); - -/** - * a static Example Utility class - * - * Do not create an instance of this! - * @class - */ -function ExampleUtils() {} // leave this function empty! A constructor is not needed for static functions. - -/** - * a public static function - * - * @param {String} pParam1 is for ... - * @param {String} pParam2 is for ... - * - * @example var myResult = ExampleUtils.staticFunction1("p1", "p2"); - * - * @return {String} a result - */ -ExampleUtils.staticFunction1 = function(pParam1, pParam2) -{ - return this._privateStaticFunction1(pParam1, pParam2, "-") -} - -/** - * a private static function - * - * Do not use outside of ExampleUtils! - * - * @param {String} pParam1 is for ... - * @param {String} pParam2 is for ... - * @param {String} pParam3 is for ... - * - * @return {String} a result - * @ignore - */ -ExampleUtils._privateStaticFunction1 = function(pParam1, pParam2, pParam3) -{ - if(pParam1 && pParam2 && pParam3) - { - ... - return pParam1 + pParam3 + pParam2; - } - - return ""; -} ----- \ No newline at end of file diff --git a/others/guide/whichDatatype.adoc b/others/guide/whichDatatype.adoc deleted file mode 100644 index 092ae1bf6ae5c02d56ced4bf133b5e956a8f23e2..0000000000000000000000000000000000000000 --- a/others/guide/whichDatatype.adoc +++ /dev/null @@ -1,105 +0,0 @@ -Overview over datatypes -======================= -:toc2: left -:numbered: - -This is a simple overview about when to to use which datatype. - -== Boolean == -=== Datatype === ----- -TINYINT ----- -=== Usage === -0 => false -1 => true - -Add nullable="false" constraint, because for boolean null makes no sense and complicates searches and validations. - -== Text == -Text should be saved as Unicode. For this prefix the datatype with a 'N' (there are some exceptions like the UUID) - -=== Big text === -For informations, descriptions, ... ----- -NCLOB ----- - -=== Small / Normal text === -For Names, ... - -You have to define the maximum length. ----- -NVARCHAR(50) ----- - -=== Fixed size text === -If you are sure that the length is always fixed and will not change. - -You have to define the length. ----- -NCHAR(5) ----- - -=== UUID's, standardized codes === -For them unicode is mostly not needed. Only use unicode here if you are sure, it is needed. - -For UUID's, standardized codes (language codes), ... - -You have to define the length. ----- -CHAR(5) ----- - -UUID needs length 36: ----- -CHAR(36) ----- - -=== Decimal numbers === -If precision and fixed decimals (Nachkommastellen) are needed, use DECIMAL. -For prices, ... ----- -NUMERIC(10, 2) ----- - -Else you can use double. ----- -DOUBLE ----- - -=== Integer numbers === -In normal cases just use INTEGER - -If you know that very big integers or only very small Integers are needed, you can also use - -Byte count may not be the same on all databases. - -8 Byte - ----- -BIGINT ----- - -4 Byte - ----- -INTEGER ----- - -2 Byte - ----- -SMALLINT ----- - -1 Byte - ----- -TINYINT ----- - -=== Binary data === ----- -BLOB ----- \ No newline at end of file diff --git a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod index fe80b890a9567ee5edbc6de54a833b49f1279899..602795eafd86b0cb8892febafb6c1a9d7de3624d 100644 --- a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod +++ b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod @@ -30,7 +30,7 @@ <recordContainerCachingAlias>RecordContainerCache</recordContainerCachingAlias> <clientSearchOptimizedForSpeed v="true" /> <clientSearchExcludeForIgnorecase v="true" /> - <neonClientPermissionsEnabled v="false" /> + <neonClientPermissionsEnabled v="true" /> <clientFeedbackMailaddress /> <blobHandlingMethod>DATABASE</blobHandlingMethod> <databaseAuditGetOldValueLobs v="false" /> diff --git a/process/Attribute_lib/process.js b/process/Attribute_lib/process.js index 3e43bcc979b9f22e2fc2b42e927dab781e4f4328..a5a3d2b7a68cb7a398fdc24b771f9a9fe500931b 100644 --- a/process/Attribute_lib/process.js +++ b/process/Attribute_lib/process.js @@ -1501,8 +1501,6 @@ function AttributeRelationQuery (pObjectRowId, pAttributeId, pObjectType) this._attributeTypes = null; this._includeFullAttributeName = false; this._includeDisplayValue = false; - - return this; } /** @@ -1711,6 +1709,41 @@ AttributeRelationQuery.prototype.getAttributeCount = function () .cell() || 0); } +AttributeRelationQuery.prototype.getMaxCount = function () +{ + if (!this._objectType || !this._rowId) + throw new Error("AttributeRelationQuery: Object type and row id are required"); + if (!this._attributeIds || this._attributeIds.length !== 1) + throw new Error("AttributeRelationQuery: You have to specify a single attribute id"); + + var attributeId = this._attributeIds[0]; + + var maxCount = newSelect("MAX_COUNT") + .from("AB_ATTRIBUTEUSAGE") + .where("AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID", attributeId) + .and("AB_ATTRIBUTEUSAGE.OBJECT_TYPE", this._objectType) + .cell(); + if (maxCount) + return Number(maxCount) || null; + return null; +} + +AttributeRelationQuery.prototype.getMinCount = function () +{ + if (!this._objectType || !this._rowId) + throw new Error("AttributeRelationQuery: Object type and row id are required"); + if (!this._attributeIds || this._attributeIds.length !== 1) + throw new Error("AttributeRelationQuery: You have to specify a single attribute id"); + + var attributeId = this._attributeIds[0]; + + return Number(newSelect("MIN_COUNT") + .from("AB_ATTRIBUTEUSAGE") + .where("AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID", attributeId) + .and("AB_ATTRIBUTEUSAGE.OBJECT_TYPE", this._objectType) + .cell()); +} + /** * Inserts a new attribute relation. * @@ -1734,17 +1767,8 @@ AttributeRelationQuery.prototype.insertAttribute = function (pValue, pOmitValida if (!pOmitValidation) { - var maxCount = newSelect("MAX_COUNT") - .from("AB_ATTRIBUTEUSAGE") - .where("AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID", attributeId) - .and("AB_ATTRIBUTEUSAGE.OBJECT_TYPE", this._objectType) - .arrayColumn(); - - if (maxCount.length == 0) - return false; - - maxCount = maxCount[0]; - if (maxCount && maxCount != 0) + var maxCount = this.getMaxCount(); + if (maxCount) { let timesUsed = this.getAttributeCount(); if (timesUsed >= maxCount) @@ -1847,15 +1871,12 @@ AttributeRelation.prototype.deleteAttribute = function (pOmitValidation) { if (!pOmitValidation) { - var minCount = newSelect("MIN_COUNT") - .from("AB_ATTRIBUTEUSAGE") - .where("AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID", this.attributeId) - .and("AB_ATTRIBUTEUSAGE.OBJECT_TYPE", this.objectType) - .cell(); - - if (minCount && minCount != 0) + var attributeQuery = new AttributeRelationQuery(this.objectRowId, this.attributeId, this.objectType); + var minCount = attributeQuery.getMinCount(); + + if (minCount) { - let timesUsed = new AttributeRelationQuery(this.objectRowId, this.attributeId, this.objectType).getAttributeCount(); + let timesUsed = attributeQuery.getAttributeCount(); if (timesUsed <= minCount) return false; } diff --git a/process/Campaign_lib/process.js b/process/Campaign_lib/process.js index 6902d8c5c76c076182bdcb6eaebae700a1dedc38..f3934b933660f8cb2ba2fe7b756d1b0094b87e7f 100644 --- a/process/Campaign_lib/process.js +++ b/process/Campaign_lib/process.js @@ -627,13 +627,20 @@ CampaignUtils.GetContactCountByCondition = function(pCondition, pLookInCampaignO */ CampaignUtils.copyCampaign = function(pCampaignid, pDescription, pEmplContactId, pName, pState) { - var params = { - "originalCampaignIdCopy_param" : pCampaignid, - "description_param" : pDescription, - "emplContactId_param" : pEmplContactId, - "name_param" : pName || "", - "state_param" : pState || "" - }; + var fieldValues = {} + var preSetValues = {} + var params = {} + + preSetValues["$field.DESCRIPTION"] = pDescription + preSetValues["$field.EMPLOYEE_CONTACT_ID"] = pEmplContactId + preSetValues["$field.NAME"] = pName + preSetValues["$field.STATUS"] = pState + + fieldValues["FIELDS"] = preSetValues + fieldValues["CAMPAIGNID"] = pCampaignid + params["Copy_param"] = JSON.stringify(fieldValues) + + neon.openContext("Campaign", null, null, neon.OPERATINGSTATE_NEW, params); } diff --git a/process/ClassificationFilter_lib/process.js b/process/ClassificationFilter_lib/process.js index e2200e6e6e8ad55b95fa5fbfdf8cf38c71884677..bf593e707733064fa47d17aa6fb2534d5785eec1 100644 --- a/process/ClassificationFilter_lib/process.js +++ b/process/ClassificationFilter_lib/process.js @@ -239,8 +239,15 @@ ClassificationGroupFilterUtils.getFilterFields = function(pObjectType) classificationGroups.forEach(function(classificationGroup, idx){ var classificationGroupId = classificationGroup["CLASSIFICATIONGROUPID"]; var classificationGroupTitle = classificationGroup["#CONTENTTITLE"]; - - var representingSqlExpression = sqlHelper.substring("CLASSIFICATIONVALUE", idx+1, 1); + + //"case when" needed since we want to group both the ones that have no classification for said classificationgroup ("-") + //and the ones that have null as the value (since not all datasets have a CLASSIFICATIONSTORAGE dataset) together + // since both don't have an classification for that group + var representingSqlExpression = SqlBuilder.caseWhen(newWhere("CLASSIFICATIONSTORAGE.CLASSIFICATIONVALUE is null")) + .thenString("-") + .elseValue(sqlHelper.substring("CLASSIFICATIONVALUE", idx+1, 1)) + .toString(); + var name = ClassificationGroupFilterNameCoder.encode(classificationGroupId, representingSqlExpression); res.push({ name: name, @@ -318,7 +325,12 @@ ClassificationGroupFilterUtils.getFilterCondition = function(pObjectType, pFilte { var decodedFilterName = ClassificationGroupFilterNameCoder.decode(pFilterName); var condition = StringUtils.replaceAll(pCondition, pColumnPlaceholder, decodedFilterName.representingSqlExpression); - + + //"case when" needed since we want to filter both the ones that have no classification for said classificationgroup ("-") + //and the ones that have null as the value (since not all datasets have a CLASSIFICATIONSTORAGE dataset) the same way + // since both don't have an classification for that group + if(pOperatorName == "IS NULL") + condition += " OR " + decodedFilterName.representingSqlExpression +"='-'"; return condition; }; diff --git a/process/Contact_lib/process.js b/process/Contact_lib/process.js index 4f73f699c57aad857c11d8e5aaa30420dc5dab3c..7bbafdc693adac2eb70bf75da3d35f24790c6560 100644 --- a/process/Contact_lib/process.js +++ b/process/Contact_lib/process.js @@ -555,6 +555,36 @@ ContactUtils.getActiveCommRestrictionsSubselect = function() return sqlMasking.concatWithSeparator(parts, " ", false); } +/** + * returns a sql subselect which counts all Commrestrictions from a Person and his Organisation. + * The select needs the CONTACT.CONTACTID column. + * + * @return {String} the resulting subselect + */ +ContactUtils.getCommRestrictionCount = function(pMedium, pStartDate) +{ + if (!pStartDate && pStartDate !== 0) + pStartDate = datetime.date(); + var firstLevel = new SqlBuilder() + .select("count(*)") + .from("COMMRESTRICTION") + .whereIfSet("COMMRESTRICTION.MEDIUM", pMedium) + .and("COMMRESTRICTION.STARTDATE", pStartDate, SqlBuilder.LESS_OR_EQUAL()) + .and("COMMRESTRICTION.CONTACT_ID = CONTACT.CONTACTID"); + + var secondLevel = new SqlBuilder() + .select("count(*)") + .from("COMMRESTRICTION") + .whereIfSet("COMMRESTRICTION.MEDIUM", pMedium) + .and("COMMRESTRICTION.STARTDATE", pStartDate, SqlBuilder.LESS_OR_EQUAL()) + .and("COMMRESTRICTION.CONTACT_ID", newSelect("c1.CONTACTID").from("CONTACT", "c1") + .join("CONTACT", "c2.ORGANISATION_ID = c1.ORGANISATION_ID and c1.PERSON_ID is null", "c2") + .where("c2.CONTACTID = CONTACT.CONTACTID") + , SqlBuilder.IN()); + + return firstLevel.toString() +") + ("+secondLevel.toString(); +} + /** * object for handling of a single contact * provides static- and instance-functions diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index 5713843c8446f0cf46217b93193046df4faebc13..1be29756778a1b8276997a7addaafa0c05583b19 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -1,3 +1,4 @@ +import("system.logging"); import("Util_lib"); import("system.entities"); import("system.tools"); @@ -29,7 +30,7 @@ function ContextUtils() {} */ ContextUtils.getCurrentContextId = function() { - return vars.getString("$sys.currentcontextname"); + return vars.getString("$sys.currentcontextname"); } /** @@ -166,7 +167,7 @@ ContextUtils.getContextConsumer = function(pContextId) case ContextUtils.getContextName("PrivatePerson"): return "PrivatePersons"; case ContextUtils.getContextName("Leadimport"): - return "Leadimport"; + return "Leadimports"; case ContextUtils.getContextName("Task"): return "Tasks"; case ContextUtils.getContextName("SupportTicket"): @@ -192,9 +193,9 @@ ContextUtils.loadContentTitle = function(pEntity, pUid, pProvider) return ""; var conf = entities.createConfigForLoadingRows() - .entity(pEntity) - .uid(pUid) - .fields(["#CONTENTTITLE"]); + .entity(pEntity) + .uid(pUid) + .fields(["#CONTENTTITLE"]); if (pProvider) conf.provider(pProvider); @@ -203,35 +204,107 @@ ContextUtils.loadContentTitle = function(pEntity, pUid, pProvider) return rows.length === 1 ? rows[0]["#CONTENTTITLE"] : ""; } + +/** + * loads the contentdescription by using entities.getRow + * @param {String} pEntity The entity name you want to load the title for + * @param {String} pUid the uid for which to load the title + * @param {String} [pProvider] providername when instead of the default provider another provider shall be used + * + * @return the #CONTENTDESCRIPTION or "" + */ +ContextUtils.loadContentDescription = function(pEntity, pUid, pProvider) +{ + if (!pUid) + return ""; + + var conf = entities.createConfigForLoadingRows() + .entity(pEntity) + .uid(pUid) + .fields(["#CONTENTDESCRIPTION"]); + + if (pProvider) + conf.provider(pProvider); + + var rows = entities.getRows(conf); + return rows.length === 1 ? rows[0]["#CONTENTDESCRIPTION"] : ""; +} + +/** + * loads specified Fields for one Row by using entities.getRow + * @param {String} pEntity The entity name you want to load the title for + * @param {String[]} [pUid] the uids for which to load the content + * @param {String[]} [pFields] fields you want as result + * @param {String[]} [pExcludeIDs] uids you want to exclude from the list + * @param {String} pProvider providername when instead of the default provider another provider shall be used + * + * @return the Values of the Fields + */ +ContextUtils.loadContent = function(pEntity, pUid, pFields, pExcludeIDs, pProvider) +{ + if (!pEntity) + return []; + + var conf = entities.createConfigForLoadingRows() + .entity(pEntity) + .uids(pUid) + .fields(pFields); + + if (pProvider) + conf.provider(pProvider); + + if (pExcludeIDs) + { + var childsArray = [{ + "type":"row", + "name":"#UID", + "operator":"NOT_IN", + "value": JSON.stringify(pExcludeIDs), + "key": JSON.stringify(pExcludeIDs), + "contenttype":"TEXT" + }]; + + + var pFilterParent = { + "type":"group", + "operator":"OR", + "childs": childsArray + }; + + conf.filter(JSON.stringify(pFilterParent)); + } + + var rows = entities.getRows(conf); + return rows && rows.length > 0 ? rows : []; +} + + /** * - * @param {Boolean} [pFilter=false] filter only for contexts which have a mapping in ContextUtils.getSelectMap - * @param {String[]} [pBlacklist] contextIds that shall not be included (so this is a additional filter to the pFilter param) + * @param {String[]} [pBlacklist] contextIds that shall not be included * @param {Boolean} [pInvertBlacklist=false] decides whether the items in pBlacklist are excluded (false) or * everything that is NOT in pBlacklist is excluded (true) * (-> if it is a whitelist or blacklist) * * @return {String[][]} the contexts [[contextId, contextName, contextTitle], [... ], ...] */ -ContextUtils.getContexts = function(pFilter, pBlacklist, pInvertBlacklist) +ContextUtils.getContexts = function(pBlacklist, pInvertBlacklist) { - if (pFilter == undefined) - pFilter = false; if (pInvertBlacklist == undefined) pInvertBlacklist = false; + var contexts = project.getDataModels(project.DATAMODEL_KIND_CONTEXT); + var contextsStandardList = ["Organisation", "Person", "PrivatePerson", "Activity", "Salesproject", "Contract", "Offer", "Order", "Product", "Task", + "Campaign", "CampaignStep", "SupportTicket", "Leadimport"]; - if (pFilter) - { - contexts = contexts.filter(function(pContext) { - if (pBlacklist && pBlacklist.indexOf(pContext[0]) > -1 != pInvertBlacklist) - return false; - // filter only contexts which have defined mappings in Context_lib - return ContextUtils.getSelectMap ()[pContext[0]] != undefined; - }); - } - else if (pBlacklist) + contexts = contexts.filter(function(pContext) { + if (contextsStandardList.indexOf(pContext[0]) > -1) + return true; + return false; + }); + + if (pBlacklist) { contexts = contexts.filter(function(pContext) { if (pBlacklist && pBlacklist.indexOf(pContext[0]) > -1 != pInvertBlacklist) @@ -241,16 +314,16 @@ ContextUtils.getContexts = function(pFilter, pBlacklist, pInvertBlacklist) } return contexts.map(ContextUtils._contextDataMapping).sort(function(pContext1, pContext2) - { - // sort after ContextTitle - if (pContext1[2] > pContext2[2]) - return 1; + { + // sort after ContextTitle + if (pContext1[2] > pContext2[2]) + return 1; - if (pContext1[2] < pContext2[2]) - return -1; + if (pContext1[2] < pContext2[2]) + return -1; - return 0; - }); + return 0; + }); } /** @@ -280,489 +353,131 @@ ContextUtils._contextDataMapping = function(pContext) return [pContext[0], contextName, (pContext[1] ? pContext[1] : contextName)]; } + /** - * represents a single context selection for one context - * this is usefull for objectlinks and 360° definition - * most properties are read only and can only be written with a setter + * gets the Title for a specific Context * - * @param {String} [pTableName] presets the matching property of the object - * @param {String} [pIdField] presets the matching property of the object - * @param {String} [pTitleExpression] presets the matching property of the object + * @param {String} pContextId the name of the context + * @param {String} pRowId Uid of certain Context * - * TODO: mostly temporary function until you can get fields from another Entity - * - * @class + * @return {String} The #CONTENTTITLE */ -function ContextSelector(pTableName, pIdField, pTitleExpression) +ContextUtils.getTitleByContext = function(pContextId, pRowId) { - //the >>this.propertyX = null;<< is for autocomplete in the designer - - /** - * title-definition; db-column or another sql-expression (like concating fields) as long as it returns one field - * read-only property; set it with a matching setter - * @property titleExpression - */ - this.titleExpression = null; ProtoPropertyUtils.makeSemiReadOnly(this, "titleExpression"); - this.setTitleExpression(pTitleExpression); - - /** - * name of the database-table - * read-only property; set it with a matching setter - * @property tableName - */ - this.tableName = null; ProtoPropertyUtils.makeSemiReadOnly(this, "tableName"); - this.setTableName(pTableName); - - /** - * db-field for the ID of one record (UID of matching context) - * read-only property; set it with a matching setter - * @property idField - */ - this.idField = null; ProtoPropertyUtils.makeSemiReadOnly(this, "idField"); - this.setIdField(pIdField); - - /** - * expression for additional joins to be made (addotopmaö pt table-name) - * read-only property; set it with a matching setter - * @property joinExpression - */ - this.joinExpression = null; ProtoPropertyUtils.makeSemiReadOnly(this, "joinExpression"); - /** - * db-field for the ID of the relation to a CONTACT-record - * read-only property; set it with a matching setter - * @property contactIdField - */ - this.contactIdField = null; ProtoPropertyUtils.makeSemiReadOnly(this, "contactIdField"); - /** - * db-field that represents the date of creation - * read-only property; set it with a matching setter - * @property creationDateField - */ - this.creationDateField = null; ProtoPropertyUtils.makeSemiReadOnly(this, "creationDateField"); - /** - * db-field where the STATE-information (active/inactive) is stored (see the activeStates-property) - * read-only property; set it with a matching setter - * @property stateField - */ - this.stateField = null; ProtoPropertyUtils.makeSemiReadOnly(this, "stateField"); - /** - * array that contains IDs of states that represent an "active"-state - * read-only property; set it with a matching setter - * @property activeStates - */ - this.activeStates = null; ProtoPropertyUtils.makeSemiReadOnly(this, "activeStates"); - this.condition = null; ProtoPropertyUtils.makeSemiReadOnly(this, "condition"); - /** - * db-field that will be used as groubBy - * read-only property; set it with a matching setter - * @property groupBy - */ - this.groupBy = null; ProtoPropertyUtils.makeSemiReadOnly(this, "groupBy"); - /** - * an object which contains the subcontexts and the prepared select to get the contactIds of them. - * - * { V-- SqlBuilder with all conditions needed V-IdCollumn name (with Tablename!) V-the contexts to show for this subcontext - * "Person": "Person": [newSelect("CONTACTID").from("CONTACT").where("PERSON_ID is not null"), "CONTACT.ORGANISATION_ID", ["Offer", "Order", "Contract", "SupportTicket"]], - * - * "Offer" ... // you can add as many subcontexts as you wish - * } - * read-only property; set it with a matching setter - * @property subContexts - */ - this.subContexts = null; ProtoPropertyUtils.makeSemiReadOnly(this, "subContexts"); + return ContextUtils.loadContentTitle(ContextUtils.getEntity(pContextId), pRowId); } + + /** - * creates a new instance of a ContextSelector and returns it - * if given it also sets some properties (property names with matching function-parameters) - * @static - */ -ContextSelector.create = function(pTableName, pIdField, pTitleExpression) -{ - return new ContextSelector(pTableName, pIdField, pTitleExpression); -}; -/** - * @param {String} pField the fieldname that shall be returned as full string - * @return {String} full field containing tablename and the column; if the column itself is already a full qualified field that field is returned - */ -ContextSelector.prototype.getFullField = function(pField) -{ - //always keep undefined (and null) just undefined since it's never a fullQualifier and tablename.undefined is useless - if (pField == undefined) - return undefined; - if (SqlUtils.isFullFieldQualifier(pField)) - return pField; - else - return this.tableName + "." + pField; -}; -/** - * @return {String} full id field containing tablename and column; if the column itself is already a full qualified field that field is returned - */ -ContextSelector.prototype.getFullIdField = function() -{ - return this.getFullField(this.idField); -}; -/** - * @return {String} full from-expression with tablename and join-part - */ -ContextSelector.prototype.getFullFromClause = function() -{ - if (this.joinExpression) - return " " + this.tableName + " " + this.joinExpression + " "; - else - return this.tableName; - -}; -/** - * @return {Object} in the following format: - * { - * "{contactid1}": [SqlBuilder, ContextArray], - * ... - * ... - * } + * gets Data from a specific Context with entities. Functions + * + * @param {String} pContextId the title of the context + * @param {String[]} [pContextConfig] Config defined in the Provider Parameter + * @param {Object} [pFilterObj] prepeared Filter Object + * @param {String[]} [pContactId] Array of all the Contactids you want to search through + * + * @return {String[][]} An Array of Fields (["#UID", "#TITLE", "#MAPPING", "#CONTENTDESCRIPTION", "#CONTENTTITLE", "CONTACT_ID", "DATE_NEW"]) for a certain Context */ -ContextSelector.prototype.getSubContexts = function(pParentRowId) -{ - if (this.subContexts) +ContextUtils.getContextDataViaReadEntity = function(pContextId, pContextConfig, pFilterObj, pContactId) +{ + if(pContextConfig.childField && pContextConfig.parentField && pContextConfig.contactIdField && pContextConfig.subContext) { - var sqls = {}; - for (let contextId in this.subContexts) - { - // Copy the builder to prevent modifying the builder in this.subContexts - var select = this.subContexts[contextId][0].copy(); - - // add id-condition - if (select.whereWasCalled()) - { - select.and(this.subContexts[contextId][1], pParentRowId); - } - else - { - select.where(this.subContexts[contextId][1], pParentRowId); - } - - sqls[contextId] = [select, this.subContexts[contextId][2]]; - } + var prefilter = Utils.buildFilterObj({}, pContextConfig.contactIdField, "IN", "TEXT", JSON.stringify(pContactId), JSON.stringify(pContactId), "OR"); + var resObj = []; + + var subConf = entities.createConfigForLoadingRows() + .entity(ContextUtils.getEntity(pContextConfig.subContext)) + .fields([pContextConfig.childField]) + .filter(JSON.stringify(prefilter.filter)) - return sqls; + var subRes = entities.getRows(subConf); + for(var id in subRes) + resObj.push(subRes[id][pContextConfig.childField]); + + pFilterObj = Utils.buildFilterObj(pFilterObj, pContextConfig.parentField, "IN", "TEXT", JSON.stringify(resObj), JSON.stringify(resObj), "AND"); } else - return {}; - -}; -//setters which to nothing special; no need to document them -ContextSelector.prototype.setTitleExpression = function(pValue) -{ - this._titleExpression = pValue; - return this; -}; -ContextSelector.prototype.setTableName = function(pValue) -{ - this._tableName = pValue; - return this; -}; -ContextSelector.prototype.setIdField = function(pValue) -{ - this._idField = pValue; - return this; -}; -ContextSelector.prototype.setJoinExpression = function(pValue) -{ - this._joinExpression = pValue; - return this; -}; -ContextSelector.prototype.setContactIdField = function(pValue) -{ - this._contactIdField = pValue; - return this; -}; -ContextSelector.prototype.setCreationDateField = function(pValue) -{ - this._creationDateField = pValue; - return this; -}; -ContextSelector.prototype.setStateField = function(pValue) -{ - this._stateField = pValue; - return this; -}; -ContextSelector.prototype.setActiveStates = function(pValue) -{ - this._activeStates = pValue; - return this; -}; -/** - * sets the condition property of a ContextSelector-object - * @param {SqlBuilder} pSqlBuilder condition as SqlBuilder-object - */ -ContextSelector.prototype.setCondition = function(pSqlBuilder) -{ - this._condition = pSqlBuilder; - return this; -}; -ContextSelector.prototype.setSubContexts = function(pContexts) -{ - this._subContexts = pContexts; - return this; -}; -ContextSelector.prototype.setGroupBy = function(pValue) -{ - this._groupBy = pValue; - return this; -}; - -/** - * TODO: !!!temporary function until you can get fields from another Entity!!! - */ -ContextUtils.getSelectMap = function() -{ - var maskingUtils = new SqlMaskingUtils(); - var isOracle = maskingUtils.dbType == db.DBTYPE_ORACLE10_CLUSTER - || maskingUtils.dbType == db.DBTYPE_ORACLE10_OCI - || maskingUtils.dbType == db.DBTYPE_ORACLE10_THIN; + { + pFilterObj = Utils.buildFilterObj(pFilterObj, "CONTACT_ID", "IN", "TEXT", JSON.stringify(pContactId), JSON.stringify(pContactId), "AND"); + } + + var fields = ["#UID", "#TITLE", "#MAPPING", "#CONTENTDESCRIPTION", "#CONTENTTITLE", "CONTACT_ID", "DATE_NEW", "ACTIVE"]; + if(pContextConfig.setGroupBy) + fields.push(pContextConfig.setGroupBy); + + + var conf = entities.createConfigForLoadingRows() + .entity(ContextUtils.getEntity(pContextId)) + .fields(fields) - return { - "Organisation": ContextSelector.create("ORGANISATION", "CONTACT.CONTACTID", "ORGANISATION.NAME") - .setJoinExpression("join CONTACT on ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID and CONTACT.PERSON_ID is null") - .setCondition(newWhere("ORGANISATION.ORGANISATIONID", "0", SqlBuilder.NOT_EQUAL())) - .setSubContexts({ - "Person": [newSelect("CONTACTID").from("CONTACT").where("PERSON_ID is not null"), "CONTACT.ORGANISATION_ID", ["Offer", "Order", "Contract", "SupportTicket"]] - }) - ,"Person": ContextSelector.create("CONTACT", "CONTACTID") - .setTitleExpression(maskingUtils.concatWithSeparator([ - new ContactTitleRenderer(Contact.createWithColumnPreset()).asSql() - ,"' - '"//looks pretty bad; TODO: workaround till Lookups can be loaded over a link-entity; then use displayProc - ,"defaultAddress.ADDRESS", "defaultAddress.BUILDINGNO" - ,"' - '" - ,"defaultAddress.COUNTRY", "defaultAddress.ZIP", "defaultAddress.CITY" - ]," ")) - .setJoinExpression("join PERSON on PERSON.PERSONID = CONTACT.PERSON_ID " - + " join ORGANISATION on ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID " - + " left join ADDRESS defaultAddress on defaultAddress.ADDRESSID = CONTACT.ADDRESS_ID") - ,"PrivatePerson": ContextSelector.create("PERSON", "PERSONID") - .setTitleExpression(maskingUtils.concatWithSeparator([ - new ContactTitleRenderer(Contact.createWithColumnPresetForPrivatePerson()).asSql() - ,"' - '"//looks pretty bad; TODO: workaround till Lookups can be loaded over a link-entity; then use displayProc - ,"defaultAddress.ADDRESS", "defaultAddress.BUILDINGNO" - ,"' - '" - ,"defaultAddress.COUNTRY", "defaultAddress.ZIP", "defaultAddress.CITY" - ]," ")) - .setJoinExpression("left join CONTACT on PERSON.PERSONID = CONTACT.PERSON_ID and CONTACT.ORGANISATION_ID = '0' left join ADDRESS defaultAddress on defaultAddress.ADDRESSID = CONTACT.ADDRESS_ID") - .setContactIdField("CONTACT.CONTACTID") - ,"Activity": ContextSelector.create("ACTIVITY", "ACTIVITYID", "SUBJECT") - ,"Salesproject": ContextSelector.create("SALESPROJECT", "SALESPROJECTID") - .setTitleExpression(maskingUtils.concatenate([ - "'" + translate.text("Salesproject") + "'", - "' '", - maskingUtils.cast("PROJECTCODE", SQLTYPES.VARCHAR, 10), - "' | '", - "PROJECTTITLE" - ])) - .setContactIdField("CONTACT_ID") - .setCreationDateField("STARTDATE") - .setStateField("STATUS") - .setActiveStates([$KeywordRegistry.salesprojectState$open(), $KeywordRegistry.salesprojectState$postponed()]) - ,"Contract": ContextSelector.create("CONTRACT", "CONTRACTID") - .setTitleExpression(maskingUtils.cast(maskingUtils.concatWithSeparator([ - KeywordUtils.getResolvedTitleSqlPart("ContractType", "CONTRACTTYPE"), - maskingUtils.cast("CONTRACTCODE", SQLTYPES.VARCHAR, 10) - ], " "), isOracle ? SQLTYPES.NVARCHAR : SQLTYPES.VARCHAR, 50)) - .setContactIdField("CONTACT_ID") - .setCreationDateField("CONTRACTSTART") - .setStateField("CONTRACTSTATUS") - .setActiveStates([$KeywordRegistry.contractState$validLimited(), $KeywordRegistry.contractState$validUnlimited(), $KeywordRegistry.contractState$notSigned()]) - ,"Offer": ContextSelector.create("OFFER", "OFFERID") - .setTitleExpression(maskingUtils.cast(maskingUtils.concatenate([ - "'" + translate.text("Offer") + "'", - "' '", - maskingUtils.cast("OFFERCODE", SQLTYPES.VARCHAR, 10), - "'-'", - maskingUtils.cast("VERSNR", SQLTYPES.VARCHAR, 10) - ]), isOracle ? SQLTYPES.NVARCHAR : SQLTYPES.VARCHAR, 50)) - .setContactIdField("CONTACT_ID") - .setCreationDateField("OFFERDATE") - .setStateField("STATUS") - .setActiveStates([$KeywordRegistry.offerStatus$open(), $KeywordRegistry.offerStatus$checked(), $KeywordRegistry.offerStatus$sent()]) - ,"Order": ContextSelector.create("SALESORDER", "SALESORDERID") - .setTitleExpression(maskingUtils.cast(maskingUtils.concatWithSeparator([ - KeywordUtils.getResolvedTitleSqlPart("OrderType", "ORDERTYPE"), - maskingUtils.cast("SALESORDERCODE", SQLTYPES.VARCHAR, 10) - ], " "), isOracle ? SQLTYPES.NVARCHAR : SQLTYPES.VARCHAR, 50)) - .setContactIdField("CONTACT_ID") - .setCreationDateField("SALESORDERDATE") - .setStateField("ORDERSTATUS") - .setActiveStates([0, 1]) - ,"Product": ContextSelector.create("PRODUCT", "PRODUCTID") - .setTitleExpression(maskingUtils.concatenate([ - "PRODUCTCODE", - "' | '", - "PRODUCTNAME" - ])) - ,"Task": ContextSelector.create("TASK", "TASKID", "SUBJECT") - ,"Campaign": ContextSelector.create("CAMPAIGN", "CAMPAIGNID") - .setTitleExpression(maskingUtils.concatWithSeparator(["CAMPAIGN.NAME", "CAMPAIGNSTEP.NAME"], " - ", false)) - .setContactIdField("CAMPAIGNPARTICIPANT.CONTACT_ID") - .setJoinExpression("left join CAMPAIGNPARTICIPANT on CAMPAIGNPARTICIPANT.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID " + - "left join CAMPAIGNSTEP on CAMPAIGNSTEP.CAMPAIGNSTEPID = CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID") - .setCreationDateField("CAMPAIGNSTEP.DATE_START") - .setStateField("CAMPAIGN.STATUS") - .setActiveStates([$KeywordRegistry.campaignState$planning(), $KeywordRegistry.campaignState$approved()]) - ,"CampaignStep" : ContextSelector.create("CAMPAIGNSTEP", "CAMPAIGNSTEPID", "NAME") - ,"SupportTicket": ContextSelector.create("TICKET", "TICKETID", "TASK.SUBJECT") - .setJoinExpression("left join TASK on TASK.TASKID = TICKET.TASK_ID left join TASKLINK on TASKLINK.TASK_ID = TASK.TASKID") - .setCondition(newWhere("TICKET.TICKETTYPE", $KeywordRegistry.ticketType$supportTicket())) - .setContactIdField("TASKLINK.OBJECT_ROWID") - .setStateField("TASK.STATUS") - .setActiveStates([ - $KeywordRegistry.taskStatus$new(), - $KeywordRegistry.taskStatus$unassigned(), - $KeywordRegistry.taskStatus$assigned(), - $KeywordRegistry.taskStatus$inProgress(), - $KeywordRegistry.taskStatus$waiting(), - $KeywordRegistry.taskStatus$customerChecks(), - ]) - .setCreationDateField("TASK.START_DATE") - ,"BulkMail" : ContextSelector.create("BULKMAIL", "BULKMAILID", "NAME") - ,"SerialLetter" : ContextSelector.create("SERIALLETTER", "SERIALLETTERID", "TITLE") - ,"Leadimport": ContextSelector.create("LEADIMPORT", "LEADIMPORTID") - .setTitleExpression("LEADIMPORT.NAME") + if(pFilterObj) + conf.filter(JSON.stringify(pFilterObj.filter)) + + var res = []; + try//if Permissions prevent the user to read data from this context, entites.getRows throws an error. But we still wanna see the other Contexts + { + res = entities.getRows(conf); } -} - -/** - * TODO: !!!temporary function until you can get fields from another Entity!!! - */ -ContextUtils.getNameSubselectSql = function(pContextIdDbField, pRowIdDbField) -{ - var select = SqlBuilder.caseStatement() - - var selectMap = ContextUtils.getSelectMap(); - for (let contextId in selectMap) + catch(ex) { - let titleSelect = newSelect(selectMap[contextId].titleExpression) - .from(selectMap[contextId].getFullFromClause()) - .where(selectMap[contextId].getFullIdField() + " = " + pRowIdDbField); - - select.when(pContextIdDbField, contextId).then(titleSelect); + logging.log(ex) } - - return select.toString(); -} - -/** - * TODO: !!!temporary function until you can get fields from another Entity!!! - */ -ContextUtils.getNameSql = function(pContextId, pRowId, pRowIdField) -{ - var selectMap = ContextUtils.getSelectMap () - if (selectMap[pContextId] != undefined) + if(res.length > 0) { - var sql = newSelect(selectMap[pContextId].titleExpression) - .from(selectMap[pContextId].getFullFromClause()); - if (pRowIdField) - sql.where(selectMap[pContextId].getFullIdField() + " = " + pRowIdField); - else - sql.whereIfSet(selectMap[pContextId].getFullIdField(), pRowId); - return sql.build(SqlBuilder.NORESULT_CONDITION()); + if(pContextConfig.subContext) + { + if(res[0]["#UID"] == undefined || res[0]["#TITLE"] == undefined || res[0]["#MAPPING"] == undefined || res[0]["#CONTENTDESCRIPTION"] == undefined + || res[0]["#CONTENTTITLE"] == undefined || res[0]["DATE_NEW"] == undefined || res[0]["ACTIVE"] == undefined) + throw new Error(translate.text("Some prereserved EntityFields which are necessary fot 360° are not available. Context: "+pContextId + +" Data: "+JSON.stringify(res))); + } + else if(res[0]["CONTACT_ID"] == undefined) + throw new Error(translate.text("CONTACT_ID is not defined! Context: "+pContextId)); } - else - return "select 1 from person where 1=2"; + return res; } /** - * TODO: !!!temporary function until you can get fields from another Entity!!! + * gets the ContactId by using ContextUtils.loadContent() + * @param {String} pContextId The Context name + * @param {String} pRowId the uid for which to get the Contactid + * + * @return the Contactid of certain Context and Uid */ ContextUtils.getContactId = function(pContextId, pRowId) { - var selectMap = ContextUtils.getSelectMap() - if (selectMap[pContextId] != undefined && selectMap[pContextId].contactIdField) - { - return newSelect(selectMap[pContextId].contactIdField) - .from(selectMap[pContextId].tableName) - .where(selectMap[pContextId].getFullIdField(), pRowId) - .cell(); - } - else - return ""; + var res = ContextUtils.loadContent(ContextUtils.getEntity(pContextId), [pRowId], ["CONTACT_ID"])[0]["CONTACT_ID"]; + return res; } + /** - * TODO: !!!temporary function until you can get fields from another Entity!!! - * nur 360 + * gets the Count of Connections by Contactid + * @param {String} pContextId The Context name + * @param {String} pContactId The Contactid * + * @return count of datasets for that specific Context */ -ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pActive, pWithState, pWithGroupBy, pUidsForFiltering, pExcludeIds) +ContextUtils.getCountByContactId = function(pContextId, pContactId) { - var selectMap = ContextUtils.getSelectMap(); - var ownContextSelector = selectMap[pContextId]; - var columns = [ownContextSelector.getFullIdField(), ownContextSelector.titleExpression]; - - if (pWithDate === true) - columns.push(ownContextSelector.getFullField(ownContextSelector.creationDateField) || "''"); - - if (pWithState === true) - { - if (ownContextSelector.stateField) - columns.push(ownContextSelector.getFullField(ownContextSelector.stateField) || "''"); - else - columns.push("''"); - } - - if (pWithGroupBy === true) - { - if (ownContextSelector.groupBy) - columns.push(ownContextSelector.getFullField(ownContextSelector.groupBy) || "''"); - else - columns.push("''"); - } - - var contextDataSelect = newSelect( columns.join(", ") ) - .from(ownContextSelector.getFullFromClause()) - .where(ownContextSelector.getFullField(ownContextSelector.contactIdField), pContactId, SqlBuilder.IN()) - .andIfSet(ownContextSelector.getFullIdField(), pUidsForFiltering, SqlBuilder.IN()) - .andIfSet(ownContextSelector.getFullIdField(), pExcludeIds, SqlBuilder.NOT_IN()); - - if (pActive != undefined) - { - var activeStates = ownContextSelector.activeStates; - if(activeStates != null && activeStates.length > 0) - { - var condSub = newWhere(); - activeStates.forEach(function (state) - { - if (ownContextSelector.stateField) - { - if(pActive) - condSub.or(ownContextSelector.getFullField(ownContextSelector.stateField), state) - else - condSub.and(ownContextSelector.getFullField(ownContextSelector.stateField), state, SqlBuilder.NOT_EQUAL()) - } - - }); - contextDataSelect.andIfSet(condSub); - } - } - contextDataSelect.andIfSet(ownContextSelector.condition); - return contextDataSelect.build(); + return ContextUtils.getContextDataViaReadEntity(pContextId, pContactId).length; } /** - * TODO: !!!temporary function until you can get fields from another Entity!!! + * decides if a record is activ or not + * @param {String[]} pActiveStates, 1-dimensional Array of Active States + * @param {String} pDBFieldName, a DBField for comparison + * + * @return a case when that resolves the active states to true and everything else to false in that Column */ -ContextUtils.getCountByContactId = function(pContextId, pContactId) +ContextUtils.buildActiveCaseWhen = function(pActiveStates, pDBFieldName) { - var contextObject = ContextUtils.getSelectMap()[pContextId]; - var tableName = contextObject.tableName; - var contactField = contextObject.getFullField(contextObject.contactIdField) - var join = contextObject.joinExpression; - if (tableName && contactField) - { - return newSelect("count(*)") - .from(tableName + (join ? join : "")) - .where(contactField, pContactId) - .cell(true, "0"); - return count; - } - return 0; + var extendedStates = []; + for(var i = 0; i < pActiveStates.length; i++) + extendedStates.push([pActiveStates[i], 'true']); + + //As default value we choose false, so we only have true or false and therefore we can filter more easily + return SqlUtils.translateStatementWithQuotes(SqlUtils.getResolvingCaseWhen(extendedStates, pDBFieldName, false)).replace("else '' end", "else 'false' end"); } function AdminViewUtils () {} @@ -784,7 +499,7 @@ AdminViewUtils.open = function (pUidField, pFields) else pUidField += " (UID)"; var rows = [ - [pUidField, pUidField, uid, "TEXT"] + [pUidField, pUidField, uid, "TEXT"] ]; if (pFields) { diff --git a/process/CreateNotification_workflowService/process.js b/process/CreateNotification_workflowService/process.js index 458f665d71468ee51ec06ffda4a690cbcd472a4e..3aa7508f4b63e62ec47537b94837d14d29ef296a 100644 --- a/process/CreateNotification_workflowService/process.js +++ b/process/CreateNotification_workflowService/process.js @@ -6,7 +6,6 @@ var variables = JSON.parse(vars.get("$local.value")); var config = notification.createConfig() .notificationType("WorkflowNotification") .addUsersWithIds([variables.notificationUser || variables.USER_ID]) - .initialState(notification.STATE_UNSEEN) .caption(variables.notificationCaption || "") .description(variables.notificationDescription || ""); diff --git a/process/DocumentTemplate_lib/process.js b/process/DocumentTemplate_lib/process.js index 68621c5eef9d557f3fe3168e8f131f3c8cd69adf..2f1507904e3a4016dab89bd39b365c77ef59b0b7 100644 --- a/process/DocumentTemplate_lib/process.js +++ b/process/DocumentTemplate_lib/process.js @@ -745,10 +745,10 @@ DocumentTemplate.prototype._getReplacedODT = function (pReplacements, pTableData var bodybegin = contentXml.indexOf("<office:body>"); var bodyend = contentXml.indexOf("</office:body>") + 14; - var bodyTemplate = contentXml.substring(bodybegin, bodyend); + var bodyTemplate = contentXml.slice(bodybegin, bodyend); var fullBody = ""; //body that contains all pages (required when the replacing is done for several contacts) - var beforeBody = contentXml.substring(0, bodybegin); - var afterBody = contentXml.substr(bodyend); + var beforeBody = contentXml.slice(0, bodybegin); + var afterBody = contentXml.slice(bodyend); for (let i = 0, l = pReplacements.length; i < l; i++) { @@ -767,27 +767,30 @@ DocumentTemplate.prototype._getReplacedODT = function (pReplacements, pTableData let tables = pTableData[i] || []; - let fromIndex = 0; + let tableEnd = 0; for (let tblIndex = 0; tblIndex < tables.length; tblIndex++) //iterate over all tables in the document { let tableData = tables[tblIndex]; if (tableData && tableData.length > 0) { - fromIndex = currentBody.indexOf("</table:table>", fromIndex) + 14; - if (fromIndex === -1) //stop if there is no table + tableEnd = currentBody.indexOf("</table:table>", tableEnd) + 14; + if (tableEnd === -1) //stop if there is no table break; - let rowBegin = currentBody.lastIndexOf("<table:table-row", fromIndex); + let rowBegin = currentBody.slice(0, tableEnd).lastIndexOf("<table:table-row"); let rowEnd = currentBody.indexOf("</table:table-row>", rowBegin) + 18; - let afterTable = currentBody.substr(rowEnd); - let tableRow = currentBody.substring(rowBegin, rowEnd); - currentBody = currentBody.substring(0, rowBegin); + let afterTable = currentBody.slice(rowEnd); + let tableRow = currentBody.slice(rowBegin, rowEnd); + tableEnd -= tableRow.length; + currentBody = currentBody.slice(0, rowBegin); for (let rowIndex = 0; rowIndex < tableData.length; rowIndex++) { let tableRowData = tableData[rowIndex]; - currentBody += that._replaceText(tableRow, tableRowData); + let replacedRow = that._replaceText(tableRow, tableRowData); + currentBody += replacedRow; + tableEnd += replacedRow.length; } currentBody += afterTable; } diff --git a/process/MSTeams_lib/process.js b/process/MSTeams_lib/process.js index 16d41e7efaf86b7f58b7cb80be742348ea1696c4..98728cf49abc577ec16ae328b5fe1aec3c980ef2 100644 --- a/process/MSTeams_lib/process.js +++ b/process/MSTeams_lib/process.js @@ -133,6 +133,10 @@ MSTeamsUtils.insertTeamIfMissing = function (pTeam) /** * Creates a new teamLink. + * + * @param {String} pTeamId id of the team + * @param {String} pRowId uid of the linked object + * @param {String} pObjectType context of the linked object */ MSTeamsUtils.createTeamLink = function (pTeamId, pRowId, pObjectType) { @@ -163,7 +167,11 @@ MSTeamsUtils.createTeamLink = function (pTeamId, pRowId, pObjectType) } /** + * Gets all linked teams of an object * + * @param {String} pRowId uid of the linked object + * @param {String} pObjectType context of the linked object + * @return {Object[]} array of {teamLinkId, teamId} */ MSTeamsUtils.getLinkedTeams = function (pRowId, pObjectType) { @@ -184,7 +192,11 @@ MSTeamsUtils.getLinkedTeams = function (pRowId, pObjectType) } /** + * Gets the linked team of an object * + * @param {String} pRowId uid of the linked object + * @param {String} pObjectType context of the linked object + * @return {String} id of the linked team, or null if ther is none */ MSTeamsUtils.getLinkedTeam = function (pRowId, pObjectType) { @@ -195,7 +207,10 @@ MSTeamsUtils.getLinkedTeam = function (pRowId, pObjectType) } /** + * Loads the contactIds associated with the given azureIds * + * @param {String[]} pAzureIds azureIds of the users + * @return {Object} object with the azureIds as keys and the corresponding contactIds as values */ MSTeamsUtils.getContactIdsByAzureIds = function (pAzureIds) { @@ -213,21 +228,32 @@ MSTeamsUtils.getContactIdsByAzureIds = function (pAzureIds) } /** + * Generates a sql expression to resolve the roles in a team for the contacts * + * @param {String} pTeamId id of the team + * @param {String} pContactIdField sql field that contains the contactId that is used for selecting the role + * @return {String} sql expression */ MSTeamsUtils.getTeamRoleSubSql = function (pTeamId, pContactIdField) { if (!pTeamId) return "''"; - var ownerIds = Object.keys(teams.getAllOwners(pTeamId)); - var ownerContactIds = MSTeamsUtils.getContactIdsByAzureIds(ownerIds); - ownerContactIds = Utils.objectValues(ownerContactIds); - - var members = teams.getAllMembers(pTeamId); - var memberIds = Object.keys(members); - var memberContactIds = MSTeamsUtils.getContactIdsByAzureIds(memberIds); - memberContactIds = Utils.objectValues(memberContactIds); + try { + var ownerIds = Object.keys(teams.getAllOwners(pTeamId)); + var ownerContactIds = MSTeamsUtils.getContactIdsByAzureIds(ownerIds); + ownerContactIds = Utils.objectValues(ownerContactIds); + + var members = teams.getAllMembers(pTeamId); + var memberIds = Object.keys(members); + var memberContactIds = MSTeamsUtils.getContactIdsByAzureIds(memberIds); + memberContactIds = Utils.objectValues(memberContactIds); + } + catch (err) + { + logging.log(err, logging.ERROR); + return "''"; + } if (ownerContactIds.length === 0 && memberContactIds.length === 0) return "''"; @@ -246,7 +272,11 @@ MSTeamsUtils.getTeamRoleSubSql = function (pTeamId, pContactIdField) } /** + * Checks if the user is an owner of the team * + * @param {String} pTeamId the id of the team + * @param {String} [pUserId=current user] the userId of the user + * @return {Boolean} true if the user is an owner */ MSTeamsUtils.isUserTeamOwner = function (pTeamId, pUserId) { @@ -256,7 +286,54 @@ MSTeamsUtils.isUserTeamOwner = function (pTeamId, pUserId) else user = tools.getUserByAttribute(tools.NAME, pUserId); - if (!user) + var azureId = user ? user[tools.PARAMS][tools.TEAMS_AZUREID] : null; + if (!azureId) return false; - return user[tools.PARAMS][tools.TEAMS_AZUREID] in teams.getAllOwners(pTeamId); + return azureId in teams.getAllOwners(pTeamId); +} + +/** + * Loads the properties of the team from the database. + * + * @param {String} pTeamId the id of the team + * @return {Object} Object with these properties: + * <ul> + * <li>teamName</li> + * <li>webUrl</li> + * <li>serviceUrl</li> + * <li>isArchived</li> + * <li>generalChannelId</li> + * </ul> + * If the team was not found, null is returned. + */ +MSTeamsUtils.getTeamInfo = function (pTeamId) +{ + var teamInfo = new SqlBuilder("Data_alias") + .select(["TEAMNAME", "WEB_URL", "SERVICE_URL", "IS_ARCHIVED", "GENERAL_CHANNELID"]) + .from("MST_TEAM") + .whereIfSet("MST_TEAM.MST_TEAMID", pTeamId) + .arrayRow(true); + + if (teamInfo.length === 0) + return null; + + return { + teamName: teamInfo[0], + webUrl: teamInfo[1], + serviceUrl: teamInfo[2], + isArchived: Utils.toBoolean(teamInfo[3]), + generalChannelId: teamInfo[4] + }; +} + +/** + * Checks if the team is active + * + * @param {String} pTeamId the id of the team + * @return {Boolean} true, if the team exists and is not archived + */ +MSTeamsUtils.isTeamActive = function (pTeamId) +{ + var teamInfo = MSTeamsUtils.getTeamInfo(pTeamId); + return teamInfo != null && !teamInfo.isArchived; } \ No newline at end of file diff --git a/process/Neon_lib/Neon_lib.aod b/process/Neon_lib/Neon_lib.aod index ace4a1e8ec19c194c1d9e00326013f3656cd35b4..6c99555616cb23f3c63162b338d9d03a4fb86a04 100644 --- a/process/Neon_lib/Neon_lib.aod +++ b/process/Neon_lib/Neon_lib.aod @@ -2,6 +2,7 @@ <process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.1"> <name>Neon_lib</name> <majorModelMode>DISTRIBUTED</majorModelMode> + <documentation>%aditoprj%/process/Neon_lib/documentation.adoc</documentation> <process>%aditoprj%/process/Neon_lib/process.js</process> <variants> <element>LIBRARY</element> diff --git a/others/guide/how to copy objects with subitems.adoc b/process/Neon_lib/documentation.adoc similarity index 100% rename from others/guide/how to copy objects with subitems.adoc rename to process/Neon_lib/documentation.adoc diff --git a/process/Order_lib/process.js b/process/Order_lib/process.js index 10c273583ad42d884846b814b622899c7d9b3f5f..74651b5982c20b9ef43762491a29380d7dea1902 100644 --- a/process/Order_lib/process.js +++ b/process/Order_lib/process.js @@ -383,7 +383,7 @@ OrderUtils.buildOrderReport = function (pOrderID) "SUMITEMSUM" : sumItemSum, "TOTAL" : text.formatDouble(total, "#,##0.00", true), "printDiscount" : printDiscount ? "1" : "0", - "Person" : db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID"))) + "Person" : ContextUtils.getTitleByContext(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID")) }; diff --git a/process/Organisation_lib/process.js b/process/Organisation_lib/process.js index 5532a6817dbac7d0f8a0e0a70dd26c7237f9725d..6a5b4e22bf0a04f89b6eb8b302a09ae76ec1b04f 100644 --- a/process/Organisation_lib/process.js +++ b/process/Organisation_lib/process.js @@ -236,3 +236,18 @@ OrgUtils.openOrgReport = function(pContactId) { neon.openContext("Organisation", "OrganisationReport_view", [pContactId], neon.OPERATINGSTATE_VIEW, null); } + +/** + * creates an subSql for resolving a org into one string of text + * useful for example in an displayValue-expression to resolave a references (which is chosen by Lookups) + * + * @param {String} pRelationIdField fieldname for the CONTACTID-condition as TABLEALIAS.COLUMNALIAS; + * @return {String} a subsql (without bracets) that can be placed within an SQL + */ +OrgUtils.getResolvingDisplaySubSql = function(pRelationIdField) +{ + //TODO: verify if there is a better solution for the usage of this as a displayValueExpression --> automatic use of #TITLE | waiting for implementation + return newSelect("NAME").from("ORGANISATION") + .join("CONTACT", "ORGANISATIONID = ORGANISATION_ID") + .where("PERSON_ID is null").and("CONTACT.CONTACTID = "+ pRelationIdField).toString(); +} diff --git a/process/Permission_lib/process.js b/process/Permission_lib/process.js index fcb7a7086c7058d276aea897d12d898781e1d61f..9a4b05adcacf8a765e7c19149128ec2e34ed7a90 100644 --- a/process/Permission_lib/process.js +++ b/process/Permission_lib/process.js @@ -704,6 +704,21 @@ function PermissionUtil () {} } return false; } + + /** + * Returns all child role ids and names of the given role. + * + * @param {String} pRoleName parent role name, mandatory + * + * @result {String[]} array with ids and names of child roles + */ + PermissionUtil.getChildRoles = function(pRoleName) { + // hierarchies where pRoleName is parent + return newSelect("ID, CHILD_ROLE", alias) + .from("ASYS_ROLES_CHILDREN") + .where("ASYS_ROLES_CHILDREN.PARENT_ROLE", pRoleName) + .table(); + } /** * Delete all links to child roles of pRoleName. diff --git a/process/SendEmail_workflowService/process.js b/process/SendEmail_workflowService/process.js index 14247ad4e4b3dda3ab4be65989fa896e1434a894..bdc3aab5db6de1f34a580ef8363a52707ba63617 100644 --- a/process/SendEmail_workflowService/process.js +++ b/process/SendEmail_workflowService/process.js @@ -21,10 +21,8 @@ actionParams.processInstanceId = processInstanceId; var additionalPlaceholders = []; if (aditoUrl) { - additionalPlaceholders.push(linkPlaceholder = new Placeholder("workflowActionLink", Placeholder.types.CALLBACKFUNCTION, function () - { - return WorkflowLinkActions.getActionLink(aditoUrl, actionParams.linkActionType, actionParams.redirectLink, actionParams); - })); + var linkPlaceholder = WorkflowLinkActions.getActionLinkPlaceholder(actionParams.linkActionType, actionParams, actionParams.redirectLink, aditoUrl); + additionalPlaceholders.push(linkPlaceholder); } var email = Email.fromTemplate(documentTemplateId, recipientContactId, null, additionalPlaceholders); diff --git a/process/SetAttribute_workflowService/process.js b/process/SetAttribute_workflowService/process.js index 394ef05424827e0551be1de20579064fded57919..b79ef56f6446a63ed5ac20979272636f811580ba 100644 --- a/process/SetAttribute_workflowService/process.js +++ b/process/SetAttribute_workflowService/process.js @@ -1,3 +1,4 @@ +import("Util_lib"); import("Sql_lib"); import("Attribute_lib"); import("system.result"); @@ -5,6 +6,7 @@ import("system.vars"); var variables = JSON.parse(vars.get("$local.value")); +var attributeValue = variables.attributeValue; var attributeId; if (variables.attributeName) { @@ -19,10 +21,23 @@ else //attributeValueVariable -> instance variable to use for the attribute value if (variables.attributeValueVariable) { - var attributeValue = variables[variables.attributeValueVariable]; - if (attributeValue !== null && attributeValue !== undefined && attributeValue !== "") - variables.attributeValue = attributeValue; + var attributeVal = variables[variables.attributeValueVariable]; + if (attributeVal !== null && attributeVal !== undefined && attributeVal !== "") + attributeValue = attributeVal; } -new AttributeRelationQuery(variables.attributeRowId || variables.targetId, attributeId, variables.attributeContext || variables.targetContext) - .insertAttribute(variables.attributeValue); \ No newline at end of file +var attributeQuery = new AttributeRelationQuery(variables.attributeRowId || variables.targetId, attributeId, + variables.attributeContext || variables.targetContext); + +if (variables.isUpdate) +{ + var currentAttribute = attributeQuery.getSingleAttribute(); + if (!currentAttribute) + attributeQuery.insertAttribute(attributeValue, true); + else + currentAttribute.updateAttribute(attributeValue) +} +else +{ + attributeQuery.insertAttribute(attributeValue); +} \ No newline at end of file diff --git a/process/SetAttribute_workflowService/serviceTaskParameterProcess.js b/process/SetAttribute_workflowService/serviceTaskParameterProcess.js index 443bc0179a0e5553a8cf3b7d41cc0f06055b4940..0e8f8d8d04235fa52184140ffe4b38ab04dae283 100644 --- a/process/SetAttribute_workflowService/serviceTaskParameterProcess.js +++ b/process/SetAttribute_workflowService/serviceTaskParameterProcess.js @@ -79,5 +79,6 @@ if (currentValues.attributeId && currentValues.attributeId.value) } parameters.push(new WorkflowServiceTaskParameter("attributeValueVariable", "Value variable", WorkflowServiceTaskParameter.STRING())); +parameters.push(new WorkflowServiceTaskParameter("isUpdate", "Overwrite", WorkflowServiceTaskParameter.BOOLEAN())); result.object(parameters); \ No newline at end of file diff --git a/process/SetCampaignStep_workflowService/process.js b/process/SetCampaignStep_workflowService/process.js index 75067927861f77b795ffd02e944cbb36319f4d5b..127041b99578edc870f70ee7a6861405e02f3f39 100644 --- a/process/SetCampaignStep_workflowService/process.js +++ b/process/SetCampaignStep_workflowService/process.js @@ -16,12 +16,12 @@ var campaignStepQuery = newSelect(["CAMPAIGNPARTICIPANTID", "CAMPAIGNSTEP_ID"]) var [participantId, currentCampaignStep] = campaignStepQuery.arrayRow(); -if (currentCampaignStep != campaignStepId) +if (campaignStepId && currentCampaignStep != campaignStepId) { - if (!currentCampaignStep) + if (!participantId) { participantId = util.getNewUUID(); - new SqlBuilder.insertFields({ + new SqlBuilder().insertFields({ "CAMPAIGNPARTICIPANTID": participantId, "CAMPAIGNSTEP_ID": campaignStepId, "CAMPAIGN_ID": campaignId, diff --git a/process/Util_lib/process.js b/process/Util_lib/process.js index b520401112abda5f16c4d67d143240fc258ef18d..ca3962c923633f5d9e531ff4f9d15e0ae5672889 100644 --- a/process/Util_lib/process.js +++ b/process/Util_lib/process.js @@ -363,6 +363,95 @@ Utils.objectValues = function (pObject) }); } + +/** + * builds/extends a filter-Object, can be used for e. g. entity.filter(), neon.setFilter, etc... + * Note: If a filter-Objects gets extended the new Filter will be added before the old one. + * @example + * It will look like this: + { + "filter":{ + "type":"group", -| + "operator":"AND", | + "childs":[ | + { | + "type":"row", |- New Condition + "name":"ACTIVE", | + "operator":"EQUAL", | + "value":"Ja", | + "key":"true", | + "contenttype":"TEXT" -| + }, + { + "type":"group", -| + "operator":"AND", | + "childs":[ | + { | + "type":"row", |- Old condition + "name":"DATE_NEW", | + "operator":"TIMEFRAME_EQUAL", | + "value":"Heute", | + "key":"REL=ADJUSTED;UNIT=DAY", | + "contenttype":"DATE" -| + } + ] + } + ] + } + } + * @param {Object} pFilterObj, the existing Filter-Object, for a new Obj use {} or null + * @param {String} pFieldName, all Fields which are filterable in that certain Entity + * @param {String} pOperator, Filteroperators, (look up "_getCondition"-Function in JditoFilter_lib for all available operator) + * @param {String} pContentType, the Contenttype of the Filter, ("TEXT",... etc) + * @param {String} pValue, this will be used as Value in the Frontend + * @param {String} pKey, this will be used as Value in the Backend + * @param {String} pParentOperator, "OR" or "AND" for the Group Operator, null = AND + * + * @return new/extended Filter-Object + */ +Utils.buildFilterObj = function(pFilterObj, pFieldName, pOperator, pContentType, pValue, pKey, pParentOperator) +{ + + if(pParentOperator && pParentOperator != "AND" && pParentOperator != "OR") + throw new Error(translate.text("Illegal Parent Operator in buildFilterObj-Function: "+pParentOperator)); + + + var subFilterObj = { + "type":"row", + "name":pFieldName, + "operator":pOperator, + "value": pValue, + "key": pKey, + "contenttype":pContentType + }; + + var parentFilter = { + "filter" : { + "type":"group", + "operator":pParentOperator, + "childs": [subFilterObj] + } + }; + + + if(pFilterObj && pFilterObj.filters && pFilterObj.filters.childs.length > 0) + { + + var push = true; + for(var i = 0; i < pFilterObj.filters.childs.length; i++) + { + if(JSON.stringify(pFilterObj.filters.childs[i]) == JSON.stringify(subFilterObj)) + push = false; + } + if(push) + { + parentFilter.filter.childs = parentFilter.filter.childs.concat([pFilterObj.filters]); + } + + } + return parentFilter; +} + /** * Class containing static utility functions for regular expression objects (RegExp) * Do not create an instance of this @@ -469,10 +558,10 @@ StringUtils.replaceAll = function(pPlainInputStr, pPlainSearchStr, pReplacement, */ StringUtils.concat = function(pSeparator, pElements) { - var res = pElements.filter(function(e){ - return e != null && e != ""; - }).join(pSeparator); - return res; + var res = pElements.filter(function(e){ + return e != null && e != ""; + }).join(pSeparator); + return res; }; /** @@ -514,18 +603,18 @@ StringUtils.pad36 = function(pValue) */ StringUtils.unescapeSlashes = function(pValue) { - // add another escaped slash if the string ends with an odd - // number of escaped slashes which will crash JSON.parse - let parsedStr = pValue.replace(/(^|[^\\])(\\\\)*\\$/, "$&\\"); - // escape " - parsedStr = parsedStr.replace(/"/, '\\"'); - try { - parsedStr = JSON.parse('"' + parsedStr + '"'); - } catch(e) { - logging.log(e); - return pValue; - } - return parsedStr ; + // add another escaped slash if the string ends with an odd + // number of escaped slashes which will crash JSON.parse + let parsedStr = pValue.replace(/(^|[^\\])(\\\\)*\\$/, "$&\\"); + // escape " + parsedStr = parsedStr.replace(/"/, '\\"'); + try { + parsedStr = JSON.parse('"' + parsedStr + '"'); + } catch(e) { + logging.log(e); + return pValue; + } + return parsedStr ; } /** @@ -1058,9 +1147,9 @@ NumberSequencingUtils.validateUniqueNumber = function(pNumber, pColumn, pTable, NumberSequencingUtils.getMaxUniqueNumber = function(pColumn, pTable, pCondition) { return newSelect(new SqlMaskingUtils().max(pColumn)) - .from(pTable) - .whereIfSet(pCondition) - .cell() || "0"; + .from(pTable) + .whereIfSet(pCondition) + .cell() || "0"; } /** @@ -1090,7 +1179,9 @@ TreeUtils.sortArrayForTree = function (pArray, pUidIndex, pParentIdIndex) var rows = {}; var allIds = {}; - pArray.forEach(function (row) {allIds[row[pUidIndex]] = true;}); + pArray.forEach(function (row) { + allIds[row[pUidIndex]] = true; + }); var index = 0; do { @@ -1104,7 +1195,7 @@ TreeUtils.sortArrayForTree = function (pArray, pUidIndex, pParentIdIndex) }; }, rows); - /* stop if no new items were added, otherwise incorrect data (for instance + /* stop if no new items were added, otherwise incorrect data (for instance an item that is it's own parent) could cause an infinite loop */ } while (oldIndex != index); var sortedArray = new Array(index); @@ -1158,7 +1249,7 @@ ConsecutiveCodeUtils.setCode = function(pId, pTable, pIdCol, pCodeCol) max = -1; newWhereIfSet(pTable + "." + pIdCol, pId) - .updateData(true, pTable, [pCodeCol], null, [parseInt(max)+1]); + .updateData(true, pTable, [pCodeCol], null, [parseInt(max)+1]); } function IdUtils() {} diff --git a/process/Workflow_lib/process.js b/process/Workflow_lib/process.js index 8e0cef19c1bcb52773a17a694a466f5a74231166..b7ec7c17972e53f10f2ce3bf439f0b4dd3790766 100644 --- a/process/Workflow_lib/process.js +++ b/process/Workflow_lib/process.js @@ -797,7 +797,7 @@ WorkflowLinkActions.types.RECEIVE_TASK.execute = function (pParameters) { if (!pParameters.processInstanceId) return; - workflow.triggerReceiveTask(pParameters.processInstanceId, pParameters.receiveTask || null); + workflow.triggerReceiveTask(pParameters.processInstanceId, pParameters.receiveTask || null, pParameters.variables || null); } /** @@ -807,7 +807,7 @@ WorkflowLinkActions.types.SIGNAL.execute = function (pParameters) { if (!pParameters.signal) return; - workflow.signalEventReceived(pParameters.signal); + workflow.signalEventReceived(pParameters.signal, pParameters.variables || null); } /** @@ -817,7 +817,7 @@ WorkflowLinkActions.types.MESSAGE.execute = function (pParameters) { if (!pParameters.processInstanceId || !pParameters.message) return; - workflow.messageEventReceived(pParameters.message, pParameters.processInstanceId); + workflow.messageEventReceived(pParameters.message, pParameters.processInstanceId, pParameters.variables || null); } /** @@ -843,6 +843,8 @@ WorkflowLinkActions.encodeAction = function (pType, pLink, pParams) actionObj.ms = pParams.message; if (pParams.receiveTask) actionObj.re = pParams.receiveTask; + if (pParams.variables) + actionObj.v = pParams.variables; actionObj.ty = pType; actionObj.ln = pLink; @@ -885,6 +887,8 @@ WorkflowLinkActions.parseAction = function (pEncodedAction) actionParams.message = parsedAction.ms; if (parsedAction.re) actionParams.receiveTask = parsedAction.re; + if (parsedAction.v) + actionParams.variables = parsedAction.v; return { type: parsedAction.ty || null, @@ -901,4 +905,15 @@ WorkflowLinkActions.parseAction = function (pEncodedAction) return null; } }; +} + +WorkflowLinkActions.getActionLinkPlaceholder = function (pLinkActionType, pActionParams, pRedirectLink, pBaseUrl) +{ + if (!pBaseUrl) + pBaseUrl = vars.get("$sys.origin"); + + return new Placeholder("workflowActionLink", Placeholder.types.CALLBACKFUNCTION, function () + { + return WorkflowLinkActions.getActionLink(pBaseUrl, pLinkActionType, pRedirectLink, pActionParams); + }); } \ No newline at end of file diff --git a/process/buildSerialLetter_serverProcess/process.js b/process/buildSerialLetter_serverProcess/process.js index 1d5cff1f39473a26019577b3c2d3c23121b5ced2..b3210e860dba7d2817b4e9465f17600fca2bcb95 100644 --- a/process/buildSerialLetter_serverProcess/process.js +++ b/process/buildSerialLetter_serverProcess/process.js @@ -21,4 +21,4 @@ SingleBinaryUtils.set("SERIALLETTER", "SERIALLETTERFILE", letterId, document.con var message = translate.text("Download ready"); var description = translate.withArguments("Serial letter \"%0\" can now be downloaded", [document.title]); -notification.addNotification(util.getNewUUID(), text.encodeMS(["SerialLetter", letterId]), null, null, "DownloadReady", notification.PRIO_NORMAL, 2, notification.STATE_UNSEEN, [user], message, description); \ No newline at end of file +notification.addNotification(util.getNewUUID(), text.encodeMS(["SerialLetter", letterId]), null, null, "DownloadReady", null, notification.PRIO_NORMAL, 2, notification.STATE_UNSEEN, [user], message, description); \ No newline at end of file diff --git a/process/importLead_serverProcess/process.js b/process/importLead_serverProcess/process.js index a24b084a933769d7e6d3ab8b6b1d316828841452..35ac42b2b31f5cd4b801573bd295413747352f42 100644 --- a/process/importLead_serverProcess/process.js +++ b/process/importLead_serverProcess/process.js @@ -192,7 +192,7 @@ if(exeptions != "")//insert error document if (userId)// if there is an user - show a notification to this user when the import is complete { var description = translate.withArguments("%0 leads imported, %1 errors", [rows, errorCount]); - notification.addNotification(util.getNewUUID(), null, null, null, "LeadImport_Notification", notification.PRIO_NORMAL, 2, notification.STATE_UNSEEN, [userId], importName, description); + notification.addNotification(util.getNewUUID(), null, null, null, "LeadImport_Notification", null, notification.PRIO_NORMAL, 2, notification.STATE_UNSEEN, [userId], importName, description); } diff --git a/process/sendBulkMail_serverProcess/process.js b/process/sendBulkMail_serverProcess/process.js index 711120feb205e4b00a1fbda8afdea68708681fca..7ed237beffbb5978141a82b08c745385a1f21bee 100644 --- a/process/sendBulkMail_serverProcess/process.js +++ b/process/sendBulkMail_serverProcess/process.js @@ -23,5 +23,5 @@ if (user && !testRecipients) var message = translate.withArguments("Bulk mail \"%0\" was sent!", [mailName]); var description = translate.withArguments("%0 mails sent sucessfully, %1 mails failed. Process took %2 s.", [res.sucessful, res.failed, Math.round((datetime.date() - startTime) / datetime.ONE_SECOND)]); - notification.addNotification(util.getNewUUID(), null, null, null, "BulkMailSent", notification.PRIO_NORMAL, 2, notification.STATE_UNSEEN, [user], message, description); + notification.addNotification(util.getNewUUID(), null, null, null, "BulkMailSent", null, notification.PRIO_NORMAL, 2, notification.STATE_UNSEEN, [user], message, description); } \ No newline at end of file diff --git a/process/updateClassifications_serverProcess/process.js b/process/updateClassifications_serverProcess/process.js index 22f452a82db5f2ffe695ad1e24a5ca85f01a9c78..5520e0170e221868a9c89a0639890824756d5cad 100644 --- a/process/updateClassifications_serverProcess/process.js +++ b/process/updateClassifications_serverProcess/process.js @@ -111,23 +111,7 @@ for (i = 0; i < objectTypes.length; i++) //update for each object_type } //this is the "upgrade" part of this process: - //first: insert default values into the records that have no entries - idsWithoutStoredClassification = newSelect(currentObjectColumn) - .from(currentObjectTable) - .where(currentObjectColumn, newSelect("CLASSIFICATIONSTORAGE.OBJECT_ROWID").from("CLASSIFICATIONSTORAGE").where("CLASSIFICATIONSTORAGE.OBJECT_TYPE", objectTypes[i]), SqlBuilder.NOT_IN()) - - if(isOrganisation) - { - idsWithoutStoredClassification.and("CONTACT.PERSON_ID is null") - .and("CONTACT.ORGANISATION_ID", OrgUtils.getPrivateOrganisationId(), SqlBuilder.NOT_EQUAL()); - } - - idsWithoutStoredClassification = idsWithoutStoredClassification.arrayColumn(); - - if(idsWithoutStoredClassification) - ClassificationUtils.insertEmptyClassification(idsWithoutStoredClassification, objectTypes[i]); - - //second: update all entries with correct classificaiton values + //update all entries with correct classificaiton values //all groups of the objectType in the correct order, needed later to also add the "-" gradings if no classificationType has been set under that group orderedGroups = newSelect("distinct CLASSIFICATIONGROUP.CLASSIFICATIONGROUPID, CLASSIFICATIONGROUP.SORTING") @@ -206,7 +190,14 @@ for (i = 0; i < objectTypes.length; i++) //update for each object_type cond = newWhere("CLASSIFICATIONSTORAGE.OBJECT_ROWID", row_Id) .and("CLASSIFICATIONSTORAGE.OBJECT_TYPE", objectTypes[i]) .and("CLASSIFICATIONSTORAGE.CLASSIFICATIONVALUE", chainedGrading, SqlBuilder.NOT_EQUAL()); - var count = Number(cond.updateData(true, table, column, null, [chainedGrading])); + if(new RegExp("^-+$").test(chainedGrading) == true || chainedGrading == "-") + { + count = newWhere("CLASSIFICATIONSTORAGE.OBJECT_ROWID", row_Id).deleteData(true, "CLASSIFICATIONSTORAGE"); + } + else + { + count = Number(cond.updateData(true, table, column, null, [chainedGrading])); + } if (count > 0) { outputInformation[objectTypes[i]].updatedElements += count; diff --git a/readme.md b/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..67a1a52f76abd63922d48d8fa5526f1e470c94a2 --- /dev/null +++ b/readme.md @@ -0,0 +1,8 @@ +# xRM + +## Useful documents to get started + +* [Coding Guidelines](https://neon.adito.de/client/KnowledgeManagement/full?id=dc6e3066-2228-4d04-b9b6-dac792d5bfec) +* [Customizing Manual](https://neon.adito.de/client/KnowledgeManagement/full?id=534c07da-387a-46e2-b5ab-040a5c1b0ab2) +* [Designer Manual](https://neon.adito.de/client/KnowledgeManagement/full?id=56507a00-9c49-4be3-b4d5-9f83cb442ff7) +* [Documentation Overview](https://neon.adito.de/client/KnowledgeManagement/full?id=42a481e3-b27d-446a-8a0b-fe5bffafc2ec) \ No newline at end of file diff --git a/report/Offer_report/ribbon/ribbontasks/task_report/customcomponents/button/imageData.png b/report/Offer_report/ribbon/ribbontasks/task_report/customcomponents/button/imageData.png deleted file mode 100644 index 49cda7d673d367ab30051c9aa9dda1dcfad22177..0000000000000000000000000000000000000000 Binary files a/report/Offer_report/ribbon/ribbontasks/task_report/customcomponents/button/imageData.png and /dev/null differ diff --git a/report/Offer_report/ribbon/ribbontasks/task_report/customcomponents/button/onClick.js b/report/Offer_report/ribbon/ribbontasks/task_report/customcomponents/button/onClick.js deleted file mode 100644 index 354885d3893c22e85f81c745e62614f8b636523b..0000000000000000000000000000000000000000 --- a/report/Offer_report/ribbon/ribbontasks/task_report/customcomponents/button/onClick.js +++ /dev/null @@ -1,44 +0,0 @@ -import("system.text"); -import("system.swing"); -import("system.translate"); -import("system.question"); -import("system.vars"); -import("system.db"); - -//@TODO: remove - -var details = vars.get("$global.RptOfferOrderDetails"); -var orgid = db.cell("select ORGANISATION_ID from CONTACT where CONTACTID = '" + details[1] + "'"); -if (orgid.substr(0, 2) == '0 ') // Privatperson -{ - var count = db.cell("select count(*) from COMMUNICATION where medium_id = 3 and ISSTANDARD = 1 and CONTACT_ID = '" + details[1] + "'"); - if (count == "0") question.showMessage(translate.text("no standard email office")); - else - sendAutoMail( translate.text("Offer") + " " + details[0], details[1], "Email_Angebot", details[2], "AGB", [], [["SPNR", details[5]]] ); -} -else // Funktion - Person in Firma -{ - var orgrelid = db.cell("select CONTACTID from CONTACT where ORGANISATION_ID = '" + orgid + "'"); - var relobjid = db.array(db.COLUMN, "select ORGANISATION_ID from OBJECTRELATION join CONTACT on CONTACTID = DEST_ID where SOURCE_ID = '" + orgrelid + "' and RELVALUE = 9"); - contactid = db.array(db.COLUMN, "select CONTACTID from CONTACT left join PERSON on PERSONID = PERSON_ID" - + " where CONTACT.STATUS = 1 and ORGANISATION_ID in ('" + orgid + "', '" + relobjid.join("','") + "')"); - - vars.set("$local.relids", "'" + contactid.join("','") + "'"); - vars.set("$local.cmb_person_to", details[1]); //Empfänger vorbelegen - contactid = swing.askUserQuestion("Email", "DLG_CHOOSE_PERSON_FOREMAIL") - if ( contactid == null ) contactid = ""; //Abbruch geklickt - else - { - var reltoid = contactid["DLG_CHOOSE_PERSON_FOREMAIL.cmb_person_to"]; - - var relccid = text.decodeMS(contactid["DLG_CHOOSE_PERSON_FOREMAIL.tbl_person_cc"]); - if (relccid.length == 0) contactid = ""; // keine Person markiert und OK geklickt - else - relccid = db.array(db.COLUMN, "select ADDR from COMMUNICATION where MEDIUM_ID = 3 and ISSTANDARD = 1 and " - + "CONTACT_ID in ('" + relccid.join("','") + "') and CONTACT_ID <> '" + reltoid + "'"); - - if ( reltoid != "" ) - sendAutoMail( translate.text(details[3]) + " " + details[0], reltoid, "Email_" + details[3], details[2], "AGB", relccid, [["SPNR", details[5]]] ); - else question.showMessage(translate.text("Put Reciever Into To")); - } -} \ No newline at end of file diff --git a/report/Salesorder_report/ribbon/ribbontasks/task_report/customcomponents/button/imageData.png b/report/Salesorder_report/ribbon/ribbontasks/task_report/customcomponents/button/imageData.png deleted file mode 100644 index 49cda7d673d367ab30051c9aa9dda1dcfad22177..0000000000000000000000000000000000000000 Binary files a/report/Salesorder_report/ribbon/ribbontasks/task_report/customcomponents/button/imageData.png and /dev/null differ diff --git a/report/Salesorder_report/ribbon/ribbontasks/task_report/customcomponents/button/onClick.js b/report/Salesorder_report/ribbon/ribbontasks/task_report/customcomponents/button/onClick.js deleted file mode 100644 index dad46b278aff6020f827b7cc76b00dd4dac82d27..0000000000000000000000000000000000000000 --- a/report/Salesorder_report/ribbon/ribbontasks/task_report/customcomponents/button/onClick.js +++ /dev/null @@ -1,46 +0,0 @@ -import("system.text"); -import("system.question"); -import("system.translate"); -import("system.swing"); -import("system.vars"); -import("system.db"); - -//@TODO: remove - -var details = vars.get("$global.RptOfferOrderDetails"); -var orgid = db.array(db.ROW, "select ORG_ID, LANG from RELATION where RELATIONID = '" + details[1] + "'"); -if (orgid[0].substr(0, 2) == '0 ') // Privatperson -{ - var count = db.cell("select count(*) from COMM where medium_id = 3 and STANDARD = 1 and RELATION_ID = '" + details[1] + "'"); - if (count == "0") question.showMessage(translate.text("No Standard-E-Mail available!")); - else - sendAutoMail( translate.text(details[3]) + " " + details[0], details[1], details[4], details[2], details[5], relccid, [["SPNR", details[6]]], orgid[1] ); -} -else // Funktion - Person in Firma -{ - var orgrelid = db.cell("select RELATIONID from RELATION where ORG_ID = '" + orgid + "'"); - var relobjid = db.array(db.COLUMN, "select ORG_ID from OBJECTRELATION join RELATION on RELATIONID = DEST_ID where SOURCE_ID = '" + orgrelid + "' and RELVALUE = 9"); - relationid = db.array(db.COLUMN, "select RELATIONID from RELATION left join PERS on PERSID = PERS_ID" - + " where RELATION.STATUS = 1 and ORG_ID in ('" + orgid[0] + "', '" + relobjid.join("','") + "')"); - - vars.set("$local.relids", "'" + relationid.join("','") + "'"); - vars.set("$local.cmb_pers_to", details[1]); //Empfänger vorbelegen - - relationid = swing.askUserQuestion("Email", "DLG_CHOOSE_PERS_FOREMAIL") - if ( relationid == null ) relationid = ""; //Abbruch geklickt - else - { - var reltoid = relationid["DLG_CHOOSE_PERS_FOREMAIL.cmb_pers_to"]; - var language = db.cell("select LANG from RELATION where RELATIONID = '" + reltoid + "'") - - var relccid = text.decodeMS(relationid["DLG_CHOOSE_PERS_FOREMAIL.tbl_pers_cc"]); - if (relccid.length == 0) relationid = ""; // keine Person markiert und OK geklickt - else - relccid = db.array(db.COLUMN, "select ADDR from COMM where MEDIUM_ID = 3 and STANDARD = 1 and " - + "RELATION_ID in ('" + relccid.join("','") + "') and RELATION_ID <> '" + reltoid + "'"); - - if ( reltoid != "" ) - sendAutoMail( translate.text(details[3]) + " " + details[0], reltoid, details[4], details[2], details[5], relccid, [["SPNR", details[6]]], language ); - else question.showMessage(translate.text("Please enter Addressee in 'to'")); - } -} \ No newline at end of file