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 7f5016480e9281e7e73761fff2b1664e8e62cdc4..f1519ab694e0dddb03b384534a5518567dee75d4 100644 --- a/.liquibase/Data_alias/basic/2020.2.2/changelog.xml +++ b/.liquibase/Data_alias/basic/2020.2.2/changelog.xml @@ -4,6 +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"/> <include relativeToChangelogFile="true" file="insert_newsletterAttribute.xml"/> -</databaseChangeLog> + <include relativeToChangelogFile="true" file="readd_ExporttemplateIndizes.xml"/> +</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 448a4c3063ed345eb03ac3fdbe31e09caaec1c2e..e77db9a1c3d3b13f9b4c297bf36cde0a4d92ccad 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml @@ -7,11 +7,11 @@ </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"/> @@ -19,9 +19,5 @@ <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 9eaa60af5abc4bfb1cb109d47a89e38fe3f24428..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" /> @@ -1714,7 +1714,7 @@ <columnType v="12" /> <size v="256" /> <scale v="0" /> - <notNull v="true" /> + <notNull v="false" /> <isUnique v="false" /> <index v="false" /> <documentation></documentation> @@ -2063,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" /> @@ -2318,7 +2318,7 @@ <scale v="9" /> <notNull v="false" /> <isUnique v="false" /> - <index v="false" /> + <index v="true" /> <documentation></documentation> <title></title> <description></description> @@ -2629,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> @@ -2638,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> @@ -2652,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/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/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/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 26336d2da24b2c18452776e35de92a7d28cfe5e4..2ed69d3a31331cf6801b12b2e12a38394e75d78b 100644 --- a/entity/AuditLogHistory_entity/AuditLogHistory_entity.aod +++ b/entity/AuditLogHistory_entity/AuditLogHistory_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>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" /> 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/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/stateProcess.js b/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/stateProcess.js index f5e9edcd5d6225637cb7ad055c09e80799997070..0bd4c4c544c99f66a5a2ce914d8abd13910ad5c5 100644 --- a/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/stateProcess.js +++ b/entity/Document_entity/entityfields/msteam/children/synchronizedocuments/stateProcess.js @@ -1,12 +1,7 @@ -import("Util_lib"); +import("MSTeams_lib"); import("system.vars"); import("system.neon"); import("system.result"); -import("Sql_lib"); -var isArchived = Utils.toBoolean(newSelect("IS_ARCHIVED") - .from("MST_TEAM") - .whereIfSet("MST_TEAM.MST_TEAMID", "$param.MSTTeamId_param") - .cell(true)); - -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/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/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/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/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/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 ac694130ae551436e4c84fab27e7960cd550a77d..7b63c5f0e10641d17d6bc056c6f771d217cc1e7d 100644 --- a/entity/MSTeamsDocument_entity/MSTeamsDocument_entity.aod +++ b/entity/MSTeamsDocument_entity/MSTeamsDocument_entity.aod @@ -4,6 +4,7 @@ <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/MSTeamsDocument_entity/documentation.adoc</documentation> <siblings /> + <recordContainer>dataless</recordContainer> <entityFields> <entityProvider> <name>#PROVIDER</name> diff --git a/entity/MSTeamsMessage_entity/MSTeamsMessage_entity.aod b/entity/MSTeamsMessage_entity/MSTeamsMessage_entity.aod index c8c2fea856f956dd20d04ecda472520b71a8791e..437ba4f01752bc9a118f40f47ce80f9fdb5b7e3c 100644 --- a/entity/MSTeamsMessage_entity/MSTeamsMessage_entity.aod +++ b/entity/MSTeamsMessage_entity/MSTeamsMessage_entity.aod @@ -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> 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/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 2d2ea6554be564f2840e6ed0a2636297fd2e52c8..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> @@ -106,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> @@ -131,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> @@ -197,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> @@ -207,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> @@ -226,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> @@ -255,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> @@ -270,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> @@ -293,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> @@ -307,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> @@ -325,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> @@ -339,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> @@ -358,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> @@ -377,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> @@ -473,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> @@ -525,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> @@ -535,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> @@ -553,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> @@ -610,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> @@ -666,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> @@ -690,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> @@ -708,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> @@ -924,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> @@ -1080,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> @@ -1147,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 dbf97ba2d22b48d2eaa34d4e91dcf5b99c0a5bf0..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" /> 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/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index 92985df6633798c936841af65063d863cd4af82e..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> 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/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/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/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/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/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/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 f7b03fedd7fc1666bd2597b3137e799ad95f4b5f..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> @@ -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/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/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 38af80580f7f10528716277d5e8b2afc95c25451..46ad514d97d35ba922f8d323e0a7166724251242 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -7383,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 566c1d1c162d7e49818d599b87b857d7a257ad79..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> @@ -8367,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> @@ -9800,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 e7cf1824f14c476e9236fe820414385ffacb5b18..b1927645977c16fee2d17e2f4586f1b6fe656f5e 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -7464,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/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/neonView/360DegreeFilter_view/360DegreeFilter_view.aod b/neonView/360DegreeFilter_view/360DegreeFilter_view.aod index fcb25887036ae11c5a7be2a6c77d2efe26ad5056..bf84f6db4d792b5c1b68175933c73acf1ea7a5ce 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.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> <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/CampaignCostExtendedFilter_view/CampaignCostExtendedFilter_view.aod b/neonView/CampaignCostExtendedFilter_view/CampaignCostExtendedFilter_view.aod index 15bdd074a0c4ec70dd41d030bdea0595e3f72cfe..bbd116c757e619b7647b372da0d8fe1ce7307437 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 1cfa11b98bd196b97633c48a548cfd3c00abf4a4..058c9bca2a29c9e469121ce22c7a92a2a532358d 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 4397f42cbf18230de40eb4ebb24f8505ada8c7a8..cd0b9ebdd1b494f1b542bf9b0321d479bfc63dbe 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 c29615b901e9d02f3a1e4ec26a3249bdcecaa4d3..dd68e125ee02842ed5a4cbbdec84edefd9e9767a 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 789dbfbf94383dc63337e0c41af2e4bfe7c662f5..7b18c973408ba1199ee63d5500cc375fe3b442ca 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 6539d7a4d36249efc9252b43feb7ab58483090cf..f397e74e04e9c6da3fc4ed20089d9ed79b84f87e 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 0f7b7272655670436b4f21df4c6f9c78f65cb426..f97bbe8c0fbb6f7ea1f4156660442b0b9b5d71ed 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 dc45eb0e658ba1ae7eba7072fac749bc7051813d..39d69eb7a2534010ea23b15b5b16c7ca6785fbb1 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 bc3590f6e3babfe2dd017f6c1ba1b5f2af7f224f..f175784272c48c6b2499de8e04de9765abc1a913 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.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> <name>CampaignStepsGantt_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> - <filterable v="true" /> <layout> <noneLayout> <name>layout</name> 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/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/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 7aa6dedab7b0ef5734961b8843144d2a9cbcdd3d..b7bf2e8a17ab57f3b798bdb5ffaf388b678ca982 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"); } /** @@ -145,7 +146,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"): @@ -171,9 +172,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); @@ -182,35 +183,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) @@ -220,16 +293,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; + }); } /** @@ -259,489 +332,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 () {} @@ -763,7 +478,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/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/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/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/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