diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index 75b65d08609e3426bdf1d8981cbf10a3ab63c975..c26a6543a438f37d1255dd4a65498ca0c6745878 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -598,9 +598,9 @@ </entityFields> </entityDb> <entityDb> - <name>COMM</name> + <name>COMMUNICATION</name> <dbName></dbName> - <idColumn>COMMID</idColumn> + <idColumn>COMMUNICATIONID</idColumn> <idGeneratorType v="0" /> <idGeneratorInterval v="1" /> <title></title> @@ -615,7 +615,7 @@ </auditSyncConfig> <entityFields> <entityFieldDb> - <name>COMMID</name> + <name>COMMUNICATIONID</name> <dbName></dbName> <primaryKey v="true" /> <columnType v="1" /> @@ -4280,7 +4280,7 @@ <resultContextNeon>Organisation_context</resultContextNeon> <affectedTables> <element>ADDRESS</element> - <element>COMM</element> + <element>COMMUNICATION</element> <element>RELATION</element> <element>ORGANISATION</element> </affectedTables> @@ -4298,7 +4298,7 @@ <resultContextNeon>Contact_context</resultContextNeon> <affectedTables> <element>ADDRESS</element> - <element>COMM</element> + <element>COMMUNICATION</element> <element>PERS</element> <element>RELATION</element> <element>ORGANISATION</element> diff --git a/aliasDefinition/Data_alias/indexsearchgroups/org/affectedIds.js b/aliasDefinition/Data_alias/indexsearchgroups/org/affectedIds.js index cd445770f7390695bb87c70bae34706cef88e4be..f4d6194acd087a3a2cebccda5f7cdf0e5c5f1d84 100644 --- a/aliasDefinition/Data_alias/indexsearchgroups/org/affectedIds.js +++ b/aliasDefinition/Data_alias/indexsearchgroups/org/affectedIds.js @@ -28,10 +28,10 @@ switch (tableName) ]]); }); break; - case "COMM": + case "COMMUNICATION": res = IndexsearchUtils.getAffectedIdValues("RELATION_ID", infoContainer, function (id){ - return db.array(db.COLUMN, ["select ADDRESS.RELATION_ID from COMM where COMMID = ?", [ - [id, SqlUtils.getSingleColumnType("COMM", "COMMID")] + return db.array(db.COLUMN, ["select ADDRESS.RELATION_ID from COMMUNICATION where COMMUNICATIONID = ?", [ + [id, SqlUtils.getSingleColumnType("COMMUNICATION", "COMMUNICATIONID")] ]]); }); break; diff --git a/aliasDefinition/Data_alias/indexsearchgroups/org/query.js b/aliasDefinition/Data_alias/indexsearchgroups/org/query.js index 229d551e02651744af7f2998ceeedc41b7090477..a1418d7fa721bbfb6e8dc7280ce114bdce2cbd86 100644 --- a/aliasDefinition/Data_alias/indexsearchgroups/org/query.js +++ b/aliasDefinition/Data_alias/indexsearchgroups/org/query.js @@ -20,11 +20,11 @@ sqlQuery = "select RELATION.RELATIONID " ,sqlHelper.concat(["defaultAddress.ZIP", "defaultAddress.CITY"]) ,"defaultAddress.COUNTRY"], ", ") + " as DESCCOLUMN " //additional indexed fields - + ",ORGANISATION.NAME, COMM.ADDR " + + ",ORGANISATION.NAME, COMMUNICATION.ADDR " + " from ORGANISATION " + " join RELATION on RELATION.ORGANISATION_ID = ORGANISATION.ORGANISATIONID and RELATION.PERS_ID is null " + " left join ADDRESS defaultAddress on defaultAddress.ADDRESSID = RELATION.ADDRESS_ID " - + " left join COMM on COMM.RELATION_ID = RELATION.RELATIONID " + + " left join COMMUNICATION on COMMUNICATION.RELATION_ID = RELATION.RELATIONID " + (queryCondition || "") + " order by RELATION.RELATIONID "; result.string(sqlQuery); \ No newline at end of file diff --git a/aliasDefinition/Data_alias/indexsearchgroups/pers/affectedIds.js b/aliasDefinition/Data_alias/indexsearchgroups/pers/affectedIds.js index 35675f6416b50f167801396e082a86e31c477363..1b4bb8a597d8c09dd38e953f9d781386257b62f6 100644 --- a/aliasDefinition/Data_alias/indexsearchgroups/pers/affectedIds.js +++ b/aliasDefinition/Data_alias/indexsearchgroups/pers/affectedIds.js @@ -31,10 +31,10 @@ switch (tableName) ]]); }); break; - case "COMM": + case "COMMUNICATION": res = IndexsearchUtils.getAffectedIdValues("RELATION_ID", infoContainer, function (id){ - return db.array(db.COLUMN, ["select ADDRESS.RELATION_ID from COMM where COMMID = ?", [ - [id, SqlUtils.getSingleColumnType("COMM", "COMMID")] + return db.array(db.COLUMN, ["select ADDRESS.RELATION_ID from COMMUNICATION where COMMUNICATIONID = ?", [ + [id, SqlUtils.getSingleColumnType("COMMUNICATION", "COMMUNICATIONID")] ]]); }); break; diff --git a/aliasDefinition/Data_alias/indexsearchgroups/pers/query.js b/aliasDefinition/Data_alias/indexsearchgroups/pers/query.js index e74359606de04789616739fb1c0f93812ff10ed0..cadb22b3fe2532311ca9dd5fc31cd8cb4728207e 100644 --- a/aliasDefinition/Data_alias/indexsearchgroups/pers/query.js +++ b/aliasDefinition/Data_alias/indexsearchgroups/pers/query.js @@ -19,12 +19,12 @@ sqlQuery = "select RELATION.RELATIONID " ,sqlHelper.concat(["defaultAddress.ZIP", "defaultAddress.CITY"]) ,"defaultAddress.COUNTRY"], ", ") + " as DESCCOLUMN " //additional indexed fields - + ",ORGANISATION.NAME, COMM.ADDR " + + ",ORGANISATION.NAME, COMMUNICATION.ADDR " + " from PERS " + " join RELATION on RELATION.PERS_ID = PERS.PERSID " + " join ORGANISATION on RELATION.ORGANISATION_ID = ORGANISATION.ORGANISATIONID " + " left join ADDRESS defaultAddress on defaultAddress.ADDRESSID = RELATION.ADDRESS_ID " - + " left join COMM on COMM.RELATION_ID = RELATION.RELATIONID " + + " left join COMMUNICATION on COMMUNICATION.RELATION_ID = RELATION.RELATIONID " + (queryCondition || "") + " order by RELATION.RELATIONID "; result.string(sqlQuery); \ No newline at end of file diff --git a/entity/Communication_entity/Communication_entity.aod b/entity/Communication_entity/Communication_entity.aod index 1588212820b46dff8afb86309170e6ad2820fc82..b611eab194f0f9c4c8ef0eab723d9e29b032bde9 100644 --- a/entity/Communication_entity/Communication_entity.aod +++ b/entity/Communication_entity/Communication_entity.aod @@ -14,7 +14,7 @@ <onValidation>%aditoprj%/entity/Communication_entity/entityfields/addr/onValidation.js</onValidation> </entityField> <entityField> - <name>COMMID</name> + <name>COMMUNICATIONID</name> <valueProcess>%aditoprj%/entity/Communication_entity/entityfields/commid/valueProcess.js</valueProcess> </entityField> <entityField> @@ -34,8 +34,8 @@ <entityParameter> <name>RelId_param</name> <expose v="true" /> - <description>This parameter is used for specifing a related &quot;RELATIONID&quot; to a COMM-entry. -Usually this is used for filtering COMM-entires by a specified contact or creating a new entry that is related to a contact.</description> + <description>This parameter is used for specifing a related &quot;RELATIONID&quot; to a COMMUNICATION-entry. +Usually this is used for filtering COMMUNICATION-entires by a specified contact or creating a new entry that is related to a contact.</description> </entityParameter> <entityField> <name>IS_STANDARD</name> @@ -165,8 +165,8 @@ Usually this is used for filtering COMM-entires by a specified contact or creati <linkInformation> <linkInformation> <name>e3567770-187a-4366-bb87-fb22ff7ff257</name> - <tableName>COMM</tableName> - <primaryKey>COMMID</primaryKey> + <tableName>COMMUNICATION</tableName> + <primaryKey>COMMUNICATIONID</primaryKey> <isUIDTable v="true" /> <readonly v="false" /> </linkInformation> @@ -174,23 +174,23 @@ Usually this is used for filtering COMM-entires by a specified contact or creati <recordFieldMappings> <dbRecordFieldMapping> <name>ADDR.value</name> - <recordfield>COMM.ADDR</recordfield> + <recordfield>COMMUNICATION.ADDR</recordfield> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>MEDIUM_ID.value</name> - <recordfield>COMM.MEDIUM_ID</recordfield> + <recordfield>COMMUNICATION.MEDIUM_ID</recordfield> </dbRecordFieldMapping> <dbRecordFieldMapping> - <name>COMMID.value</name> - <recordfield>COMM.COMMID</recordfield> + <name>COMMUNICATIONID.value</name> + <recordfield>COMMUNICATION.COMMUNICATIONID</recordfield> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>RELATION_ID.value</name> - <recordfield>COMM.RELATION_ID</recordfield> + <recordfield>COMMUNICATION.RELATION_ID</recordfield> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>STANDARD.value</name> - <recordfield>COMM.STANDARD</recordfield> + <recordfield>COMMUNICATION.STANDARD</recordfield> </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> diff --git a/entity/Communication_entity/entityfields/addr/contentTypeProcess.js b/entity/Communication_entity/entityfields/addr/contentTypeProcess.js index bc63ebb57a3a06d31a38b047aa6cb3dfe5127210..734b617ebd9de9c05452c2fb1bfbde995957f891 100644 --- a/entity/Communication_entity/entityfields/addr/contentTypeProcess.js +++ b/entity/Communication_entity/entityfields/addr/contentTypeProcess.js @@ -7,7 +7,7 @@ var medium, contentType; //TODO: add constants for contentTypes #1022547 medium = vars.get("$field.MEDIUM_ID"); if (medium){ - contentType = KeywordUtils.createKeyword("COMM.MEDIUM").getPropForKey(medium, "contentType", true) || "TEXT"; + contentType = KeywordUtils.createKeyword("COMMUNICATION.MEDIUM").getPropForKey(medium, "contentType", true) || "TEXT"; } else { contentType = "TEXT"; diff --git a/entity/Communication_entity/entityfields/addr/onValidation.js b/entity/Communication_entity/entityfields/addr/onValidation.js index 46ef615162332b5c2065c87b20629319e8f4cb65..2a4456424e4625d625a04dd9e7adcce7c3443bc2 100644 --- a/entity/Communication_entity/entityfields/addr/onValidation.js +++ b/entity/Communication_entity/entityfields/addr/onValidation.js @@ -8,7 +8,7 @@ import("Comm_lib"); import("Util_lib"); import("Entity_lib"); -var kwd = KeywordUtils.createKeyword("COMM.MEDIUM"); +var kwd = KeywordUtils.createKeyword("COMMUNICATION.MEDIUM"); var commMedium = vars.get("$field.MEDIUM_ID"); var commCategory = kwd.getPropForKey(commMedium, "contentType", true);//TODO: maybe accessible via $property - then it's not needed to keep this information within the keyword diff --git a/entity/Communication_entity/entityfields/commid/valueProcess.js b/entity/Communication_entity/entityfields/commid/valueProcess.js index d4df48974beb7ec3b5bc66186d63ab4a9ed2c177..9cf79dfccbe19963d8013ab6077339cc1c5bbce5 100644 --- a/entity/Communication_entity/entityfields/commid/valueProcess.js +++ b/entity/Communication_entity/entityfields/commid/valueProcess.js @@ -3,6 +3,6 @@ import("system.result"); import("system.neon"); import("system.vars"); -//do not check if own value is null or empty because the own value is currently not set correctly when you've got several COMM entries (e.g. in a list edit) +//do not check if own value is null or empty because the own value is currently not set correctly when you've got several COMMUNICATION entries (e.g. in a list edit) if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) result.string(util.getNewUUID()); \ No newline at end of file diff --git a/entity/Communication_entity/entityfields/medium_id/possibleItemsProcess.js b/entity/Communication_entity/entityfields/medium_id/possibleItemsProcess.js index 7274de0d4f40bd1d411fe83c4c1afbf8b845f27e..239221207238610962d98fd00adad5ccedf98e85 100644 --- a/entity/Communication_entity/entityfields/medium_id/possibleItemsProcess.js +++ b/entity/Communication_entity/entityfields/medium_id/possibleItemsProcess.js @@ -3,5 +3,5 @@ import("system.vars"); import("system.result"); import("Keyword_lib"); -var items = KeywordUtils.getStandardArray("COMM.MEDIUM"); +var items = KeywordUtils.getStandardArray("COMMUNICATION.MEDIUM"); result.object(items); diff --git a/entity/Communication_entity/entityfields/medium_id/valueMappingProcess.js b/entity/Communication_entity/entityfields/medium_id/valueMappingProcess.js index 41e8d5ace570e64a8ea585ad461070c80d870ce1..9c59823cfa09ef0ba1b7c0357b1c6c57c17395f5 100644 --- a/entity/Communication_entity/entityfields/medium_id/valueMappingProcess.js +++ b/entity/Communication_entity/entityfields/medium_id/valueMappingProcess.js @@ -3,5 +3,5 @@ import("Keyword_lib"); var kwdUtils, items; -items = KeywordUtils.getStandardArray("COMM.MEDIUM"); +items = KeywordUtils.getStandardArray("COMMUNICATION.MEDIUM"); result.object(items); \ No newline at end of file diff --git a/entity/Communication_entity/entityfields/standard/valueProcess.js b/entity/Communication_entity/entityfields/standard/valueProcess.js index 476d7a3965630a3e6ed1fdca2a85b6b770389ade..e5bf780cd89307c7d38644f771e5f1cfbf4d4579 100644 --- a/entity/Communication_entity/entityfields/standard/valueProcess.js +++ b/entity/Communication_entity/entityfields/standard/valueProcess.js @@ -3,6 +3,6 @@ import("system.result"); import("system.neon"); import("system.vars"); -//do not check if own value is null or empty because the own value is currently not set correctly when you've got several COMM entries (e.g. in a list edit) +//do not check if own value is null or empty because the own value is currently not set correctly when you've got several COMMUNICATION entries (e.g. in a list edit) if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) result.string("0"); \ No newline at end of file diff --git a/entity/Communication_entity/recordcontainers/db/conditionProcess.js b/entity/Communication_entity/recordcontainers/db/conditionProcess.js index ebe21a6fe88cce44a52e4ca75c2c489b87fe0366..656954acb7a3c683d69472d9c0c522c0febe4f8f 100644 --- a/entity/Communication_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Communication_entity/recordcontainers/db/conditionProcess.js @@ -5,13 +5,13 @@ import("Sql_lib"); import("Keyword_lib"); var cond = new SqlCondition(); -cond.andPrepareVars("COMM.RELATION_ID", "$param.RelId_param"); +cond.andPrepareVars("COMMUNICATION.RELATION_ID", "$param.RelId_param"); if (vars.exists("$param.CommMediumIds_param")) { var mediumIds = vars.get("$param.CommMediumIds_param"); mediumIds = JSON.parse(mediumIds); if(mediumIds.length > 0) - cond.and("COMM.MEDIUM_ID in (" + mediumIds.join(", ") + ")"); + cond.and("COMMUNICATION.MEDIUM_ID in (" + mediumIds.join(", ") + ")"); } result.string(db.translateCondition([cond.toString("1 = 2"), cond.preparedValues])); \ No newline at end of file diff --git a/entity/Communication_entity/recordcontainers/db/orderClauseProcess.js b/entity/Communication_entity/recordcontainers/db/orderClauseProcess.js index 59b6f431634dfc3927ca2718723984798a5aaf67..357a9c6afc43293107fa036472a3eaf07376db83 100644 --- a/entity/Communication_entity/recordcontainers/db/orderClauseProcess.js +++ b/entity/Communication_entity/recordcontainers/db/orderClauseProcess.js @@ -2,5 +2,5 @@ import("system.result"); import("system.db"); result.object({ - "COMM.MEDIUM_ID": db.ASCENDING + "COMMUNICATION.MEDIUM_ID": db.ASCENDING }); \ No newline at end of file diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index ec3b3e104c974042ffe6309c7e350b09adb6bbde..ee8983b97f1d946125360dd2077fc8930e8a5694 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -183,8 +183,8 @@ <name>RelId_param</name> <code>%aditoprj%/entity/Organisation_entity/entityfields/communications/children/relid_param/code.js</code> <triggerRecalculation v="true" /> - <description>This parameter is used for specifing a related &quot;RELATIONID&quot; to a COMM-entry. -Usually this is used for filtering COMM-entires by a specified contact or creating a new entry that is related to a contact.</description> + <description>This parameter is used for specifing a related &quot;RELATIONID&quot; to a COMMUNICATION-entry. +Usually this is used for filtering COMMUNICATION-entires by a specified contact or creating a new entry that is related to a contact.</description> </entityParameter> </children> </entityConsumer> diff --git a/entity/Organisation_entity/entityfields/openeditdefaultsview/documentation.adoc b/entity/Organisation_entity/entityfields/openeditdefaultsview/documentation.adoc index 4a3886f50d9c1775f05859028641ecbc5e1431f5..ab81639f42ccb95adad877afcd99b858f403cf0a 100644 --- a/entity/Organisation_entity/entityfields/openeditdefaultsview/documentation.adoc +++ b/entity/Organisation_entity/entityfields/openeditdefaultsview/documentation.adoc @@ -1,2 +1,2 @@ This action opens a view where standard values can be changed for a ORGANISATION. -For example, this could be a standard mail-address (COMM entries) or the standard (postal) address. +For example, this could be a standard mail-address (COMMUNICATION entries) or the standard (postal) address. diff --git a/others/db_changes/data_alias/data/example_org/ORG_gfk.xml b/others/db_changes/data_alias/data/example_org/ORG_gfk.xml index f4ca062cf4b1f1b69414133e84ce6ec8638d0da8..746a08940c093dc975526d662dc409ca549a9e43 100644 --- a/others/db_changes/data_alias/data/example_org/ORG_gfk.xml +++ b/others/db_changes/data_alias/data/example_org/ORG_gfk.xml @@ -24,22 +24,22 @@ <column name="STATUS" value="BSIC0rel-stat-actv-ae03-b6b04430e90b"/> <column name="ADDRESS_ID" value="14d03432-985b-4efe-a634-da71ae482907"/> </insert> - <insert tableName="COMM"> - <column name="COMMID" value="14a01219-985b-4efe-a634-da71ae482907"/> + <insert tableName="COMMUNICATION"> + <column name="COMMUNICATIONID" value="14a01219-985b-4efe-a634-da71ae482907"/> <column name="RELATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/> <column name="MEDIUM_ID" valueNumeric="1"/> <column name="ADDR" value="gfk@domain.local"/> <column name="STANDARD" valueNumeric="1"/> </insert> - <insert tableName="COMM"> - <column name="COMMID" value="22d07819-985b-4efe-a634-da71ae482907"/> + <insert tableName="COMMUNICATION"> + <column name="COMMUNICATIONID" value="22d07819-985b-4efe-a634-da71ae482907"/> <column name="RELATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/> <column name="MEDIUM_ID" valueNumeric="2"/> <column name="ADDR" value="098713332"/> <column name="STANDARD" valueNumeric="0"/> </insert> - <insert tableName="COMM"> - <column name="COMMID" value="00d07819-985b-4efe-a634-da71ae482907"/> + <insert tableName="COMMUNICATION"> + <column name="COMMUNICATIONID" value="00d07819-985b-4efe-a634-da71ae482907"/> <column name="RELATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/> <column name="MEDIUM_ID" valueNumeric="3"/> <column name="ADDR" value="www.gfk.de"/> @@ -116,20 +116,20 @@ <param value="14d03432-985b-4efe-a634-da71ae482907" /> </whereParams> </delete> - <delete tableName="COMM"> - <where>COMMID = ?</where> + <delete tableName="COMMUNICATION"> + <where>COMMUNICATIONID = ?</where> <whereParams> <param value="00d07819-985b-4efe-a634-da71ae482907" /> </whereParams> </delete> - <delete tableName="COMM"> - <where>COMMID = ?</where> + <delete tableName="COMMUNICATION"> + <where>COMMUNICATIONID = ?</where> <whereParams> <param value="22d07819-985b-4efe-a634-da71ae482907" /> </whereParams> </delete> - <delete tableName="COMM"> - <where>COMMID = ?</where> + <delete tableName="COMMUNICATION"> + <where>COMMUNICATIONID = ?</where> <whereParams> <param value="14a01219-985b-4efe-a634-da71ae482907" /> </whereParams> diff --git a/others/db_changes/data_alias/data/example_pers/PERS_pfiffig.xml b/others/db_changes/data_alias/data/example_pers/PERS_pfiffig.xml index 4377d5c93a84ee6f2a936636982d0210dd68576b..e68181dd7707459392fd1ee4dcfa7f3199cd1949 100644 --- a/others/db_changes/data_alias/data/example_pers/PERS_pfiffig.xml +++ b/others/db_changes/data_alias/data/example_pers/PERS_pfiffig.xml @@ -18,15 +18,15 @@ <column name="ORGANISATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/> <column name="STATUS" value="BSIC0rel-stat-actv-ae03-b6b04430e90b"/> </insert> - <insert tableName="COMM"> - <column name="COMMID" value="14d01219-985b-4efe-a634-da71ae482907"/> + <insert tableName="COMMUNICATION"> + <column name="COMMUNICATIONID" value="14d01219-985b-4efe-a634-da71ae482907"/> <column name="RELATION_ID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/> <column name="MEDIUM_ID" valueNumeric="1"/> <column name="ADDR" value="pfiffig@web.de"/> <column name="STANDARD" valueNumeric="1"/> </insert> - <insert tableName="COMM"> - <column name="COMMID" value="22d01219-985b-4efe-a634-da71ae482907"/> + <insert tableName="COMMUNICATION"> + <column name="COMMUNICATIONID" value="22d01219-985b-4efe-a634-da71ae482907"/> <column name="RELATION_ID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/> <column name="MEDIUM_ID" valueNumeric="2"/> <column name="ADDR" value="08871333"/> @@ -81,14 +81,14 @@ <param value="14d01332-985b-4efe-a634-da71ae482907" /> </whereParams> </delete> - <delete tableName="COMM"> - <where>COMMID = ?</where> + <delete tableName="COMMUNICATION"> + <where>COMMUNICATIONID = ?</where> <whereParams> <param value="22d01219-985b-4efe-a634-da71ae482907" /> </whereParams> </delete> - <delete tableName="COMM"> - <where>COMMID = ?</where> + <delete tableName="COMMUNICATION"> + <where>COMMUNICATIONID = ?</where> <whereParams> <param value="14d01219-985b-4efe-a634-da71ae482907" /> </whereParams> diff --git a/others/db_changes/data_alias/data/example_pers/PERS_sommer.xml b/others/db_changes/data_alias/data/example_pers/PERS_sommer.xml index e436e95534316a410ee430303a836659ead6a2a7..b2249cccec782e1d9c0bcf0d5cc8bed3ea857b38 100644 --- a/others/db_changes/data_alias/data/example_pers/PERS_sommer.xml +++ b/others/db_changes/data_alias/data/example_pers/PERS_sommer.xml @@ -18,15 +18,15 @@ <column name="ORGANISATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/> <column name="STATUS" value="BSIC0rel-stat-actv-ae03-b6b04430e90b"/> </insert> - <insert tableName="COMM"> - <column name="COMMID" value="14d05619-985b-4efe-a634-da71ae482907"/> + <insert tableName="COMMUNICATION"> + <column name="COMMUNICATIONID" value="14d05619-985b-4efe-a634-da71ae482907"/> <column name="RELATION_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/> <column name="MEDIUM_ID" valueNumeric="1"/> <column name="ADDR" value="sommer@gfk.de"/> <column name="STANDARD" valueNumeric="1"/> </insert> - <insert tableName="COMM"> - <column name="COMMID" value="58d01219-985b-4efe-a634-da71ae482907"/> + <insert tableName="COMMUNICATION"> + <column name="COMMUNICATIONID" value="58d01219-985b-4efe-a634-da71ae482907"/> <column name="RELATION_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/> <column name="MEDIUM_ID" valueNumeric="2"/> <column name="ADDR" value="087631333"/> @@ -81,14 +81,14 @@ <param value="11d01332-985b-4efe-a634-da71ae482907" /> </whereParams> </delete> - <delete tableName="COMM"> - <where>COMMID = ?</where> + <delete tableName="COMMUNICATION"> + <where>COMMUNICATIONID = ?</where> <whereParams> <param value="58d01219-985b-4efe-a634-da71ae482907" /> </whereParams> </delete> - <delete tableName="COMM"> - <where>COMMID = ?</where> + <delete tableName="COMMUNICATION"> + <where>COMMUNICATIONID = ?</where> <whereParams> <param value="14d05619-985b-4efe-a634-da71ae482907" /> </whereParams> diff --git a/others/db_changes/data_alias/struct/create_comm.xml b/others/db_changes/data_alias/struct/create_comm.xml index fc45858a7aad59c6465d78a929af76b4b60c439a..f052d99af89c61195f424d421c30c5f6fadfc2a6 100644 --- a/others/db_changes/data_alias/struct/create_comm.xml +++ b/others/db_changes/data_alias/struct/create_comm.xml @@ -1,8 +1,8 @@ <?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="t.feldmann" id="33b5d1ac-08cf-3331-90a8-8cbc1439bfca"> - <createTable tableName="COMM"> - <column name="COMMID" type="CHAR(36)"> + <createTable tableName="COMMUNICATION"> + <column name="COMMUNICATIONID" type="CHAR(36)"> <constraints primaryKey="true" primaryKeyName="PK_COMM_COMMID"/> </column> <column name="ADDR" type="NVARCHAR(255)"/> diff --git a/process/Comm_lib/process.js b/process/Comm_lib/process.js index 1bc3626efb35106aac4462ad9c75702659eb40f8..a7f379a4d5ff746f7aeb2f95eb017ad08040574e 100644 --- a/process/Comm_lib/process.js +++ b/process/Comm_lib/process.js @@ -16,13 +16,13 @@ import("Sql_lib"); function CommUtil(){} /** - * returns the ids of COMM.MEDIUM that are clustered unter a specific category - * @param {String} pCategory value of the keyword "COMM.MEDIUM" custom.category; e.g. "PHONE" + * returns the ids of COMMUNICATION.MEDIUM that are clustered unter a specific category + * @param {String} pCategory value of the keyword "COMMUNICATION.MEDIUM" custom.category; e.g. "PHONE" * @return {String[]} array of the medium-ids */ CommUtil.getMediumIdsByCategory = function (pCategory) { - var kwd = KeywordUtils.createKeyword("COMM.MEDIUM"); + var kwd = KeywordUtils.createKeyword("COMMUNICATION.MEDIUM"); kwd.filter(function(id, name, customs){ return customs.category == pCategory; }); @@ -31,11 +31,11 @@ CommUtil.getMediumIdsByCategory = function (pCategory) }; /** - * sets the standard address for COMM entries for a specific category; - * does not verify if the COMMID you provide has the given category + * sets the standard address for COMMUNICATION entries for a specific category; + * does not verify if the COMMUNICATIONID you provide has the given category * @param {String} pAffectedRowId a refencial ID whoes COMMs should be modified (a RELATIONID) - * @param {String} pNewStandardCommId COMMID of the new STANDARD comm-entry; can be an empty string if no new standard adress shall be set but the old standard removed - * @param {String} pCategory value of the keyword "COMM.MEDIUM" custom.category; e.g. "PHONE"; the STANDARD of this category is set + * @param {String} pNewStandardCommId COMMUNICATIONID of the new STANDARD comm-entry; can be an empty string if no new standard adress shall be set but the old standard removed + * @param {String} pCategory value of the keyword "COMMUNICATION.MEDIUM" custom.category; e.g. "PHONE"; the STANDARD of this category is set * @return {null} currently returns always null; reserved for future */ CommUtil.setStandardForCategory = function(pAffectedRowId, pNewStandardCommId, pCategory) @@ -49,13 +49,13 @@ CommUtil.setStandardForCategory = function(pAffectedRowId, pNewStandardCommId, p var statements = []; var cols = ["STANDARD"]; - var types = db.getColumnTypes("COMM", cols); + var types = db.getColumnTypes("COMMUNICATION", cols); //set current standard comm-record as non-standard - var cond = SqlCondition.begin().and("STANDARD = 1").andPrepare("COMM.RELATION_ID", pAffectedRowId); + var cond = SqlCondition.begin().and("STANDARD = 1").andPrepare("COMMUNICATION.RELATION_ID", pAffectedRowId); //mediumIds cannot be empty so no need to do further checks (this is checked above) cond.and("MEDIUM_ID in (" + mediumIds.join(", ") + ")"); - statements.push(["COMM", cols, types, ["0"], cond.build()]); + statements.push(["COMMUNICATION", cols, types, ["0"], cond.build()]); //pNewStandardCommId can be an empty string if the standard has to only be removed if (pNewStandardCommId != "") @@ -63,9 +63,9 @@ CommUtil.setStandardForCategory = function(pAffectedRowId, pNewStandardCommId, p //set the new standard comm-record cond.clear(); //check commid, relId and medium to prevent data-inconsistency when bad function params are passed by (e.g commid of a different category) - cond.andPrepare("COMM.COMMID", pNewStandardCommId).andPrepare("COMM.RELATION_ID", pAffectedRowId); + cond.andPrepare("COMMUNICATION.COMMUNICATIONID", pNewStandardCommId).andPrepare("COMMUNICATION.RELATION_ID", pAffectedRowId); cond.and("MEDIUM_ID in (" + mediumIds.join(", ") + ")"); - statements.push(["COMM", cols, types, ["1"], cond.build()]); + statements.push(["COMMUNICATION", cols, types, ["1"], cond.build()]); } count = db.updates(statements); @@ -73,10 +73,10 @@ CommUtil.setStandardForCategory = function(pAffectedRowId, pNewStandardCommId, p }; /** - * sets the standard PHONE-entry for COMM - * does not verify if the COMMID you provide is actually PHONE-COMM + * sets the standard PHONE-entry for COMMUNICATION + * does not verify if the COMMUNICATIONID you provide is actually PHONE-COMMUNICATION * @param {String} pAffectedRowId a refencial ID whoes COMMs should be modified (a RELATIONID) - * @param {String} pNewStandardCommId COMMID of the new STANDARD comm-entry + * @param {String} pNewStandardCommId COMMUNICATIONID of the new STANDARD comm-entry * @return {null} currently returns always null; reserved for future */ CommUtil.setStandardPhone = function(pAffectedRowId, pNewStandardCommId) @@ -85,10 +85,10 @@ CommUtil.setStandardPhone = function(pAffectedRowId, pNewStandardCommId) }; /** - * sets the standard EMAIL-entry for COMM - * does not verify if the COMMID you provide is actually EMAIL-COMM + * sets the standard EMAIL-entry for COMMUNICATION + * does not verify if the COMMUNICATIONID you provide is actually EMAIL-COMMUNICATION * @param {String} pAffectedRowId a refencial ID whoes COMMs should be modified (a RELATIONID) - * @param {String} pNewStandardCommId COMMID of the new STANDARD comm-entry + * @param {String} pNewStandardCommId COMMUNICATIONID of the new STANDARD comm-entry * @return {null} currently returns always null; reserved for future */ CommUtil.setStandardMail = function(pAffectedRowId, pNewStandardCommId) @@ -97,8 +97,8 @@ CommUtil.setStandardMail = function(pAffectedRowId, pNewStandardCommId) }; /** - * returns a sub sql-string (without bracets) for getting the standard address of a COMM - * @param {String} pCategory value of the keyword "COMM.MEDIUM" custom.category; e.g. "PHONE" + * returns a sub sql-string (without bracets) for getting the standard address of a COMMUNICATION + * @param {String} pCategory value of the keyword "COMMUNICATION.MEDIUM" custom.category; e.g. "PHONE" * @param {String|SqlCondition} [pRelationField=RELATION.RELATIONID] SQL-fieldname that shall be used for filtering the RELATION_ID, this can be a string(fieldname) or an SqlCondition object * @return {String} sub-sql */ @@ -109,9 +109,9 @@ CommUtil.getStandardSubSqlForCategory = function(pCategory, pRelationField) var cond = SqlCondition.begin(); if (pRelationField == undefined) - cond.and("COMM.RELATION_ID = RELATION.RELATIONID"); + cond.and("COMMUNICATION.RELATION_ID = RELATION.RELATIONID"); else if (typeof(pRelationField) == "string") - cond.andPrepare("COMM.RELATION_ID", pRelationField); + cond.andPrepare("COMMUNICATION.RELATION_ID", pRelationField); else if (typeof(pRelationField) == "object") { //you may want to sepcify a concrete value @@ -127,18 +127,18 @@ CommUtil.getStandardSubSqlForCategory = function(pCategory, pRelationField) var anyMediumIdCond = SqlCondition.begin(); mediumIds.forEach(function(pMediumId) { - anyMediumIdCond.orPrepare("COMM.MEDIUM_ID", pMediumId); + anyMediumIdCond.orPrepare("COMMUNICATION.MEDIUM_ID", pMediumId); }); cond.andSqlCondition(anyMediumIdCond, "1=0"); - cond.and("COMM.STANDARD = 1"); + cond.and("COMMUNICATION.STANDARD = 1"); - var res = db.translateStatement(cond.buildSql("select max(COMM.ADDR) from COMM", "1=0")); + var res = db.translateStatement(cond.buildSql("select max(COMMUNICATION.ADDR) from COMMUNICATION", "1=0")); return res; }; /** - * returns a sub sql-string (without bracets) for getting the standard address of a PHONE-COMM + * returns a sub sql-string (without bracets) for getting the standard address of a PHONE-COMMUNICATION * @param {String|SqlCondition} [pRelationField=RELATION.RELATIONID] SQL-fieldname that shall be used for filtering the RELATION_ID, this can be a string(fieldname) or an SqlCondition object * @return {String} sub-sql */ @@ -148,7 +148,7 @@ CommUtil.getStandardSubSqlPhone = function(pRelationField) }; /** - * returns a sub sql-string (without bracets) for getting the standard address of a EMAIL-COMM + * returns a sub sql-string (without bracets) for getting the standard address of a EMAIL-COMMUNICATION * @param {String|SqlCondition} [pRelationField=RELATION.RELATIONID] SQL-fieldname that shall be used for filtering the RELATION_ID, this can be a string(fieldname) or an SqlCondition object * @return {String} sub-sql */ @@ -166,7 +166,7 @@ CommUtil.getStandardSubSqlMail= function(pRelationField) function CommValidationUtil() {} /** - * creates a function depending on a given COMM-category (like PHONE, EMAIL, etc.) or null if no validation-function was defined for the given category + * creates a function depending on a given COMMUNICATION-category (like PHONE, EMAIL, etc.) or null if no validation-function was defined for the given category * @param {string} commCategory category that determines which function shall be created, e.g. "EMAIL" * @return {function} function that receives the following arguments: * <br/> - commAddress diff --git a/process/Keyword_lib/process.js b/process/Keyword_lib/process.js index 504d19a735a6499714bf26c6b337e2f7163fc2e0..b27214ca132278809606983884e05265d82f66ae 100644 --- a/process/Keyword_lib/process.js +++ b/process/Keyword_lib/process.js @@ -220,7 +220,7 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL ,_createKeywordEntry("3", translate.text("Online-Meeting", locale), null, {defaultAvatarRepresentation: "VAADIN:GLOBE_WIRE"}) ]); break; - case "COMM.MEDIUM": + case "COMMUNICATION.MEDIUM": valueContainer = _createKeywordEntriesContainer([ _createKeywordEntry("0", translate.text("Mobile", locale), null, {category: "PHONE", contentType: "TELEPHONE"}) ,_createKeywordEntry("1", translate.text("E-Mail", locale), null, {category: "EMAIL", contentType: "EMAIL"}) diff --git a/process/Org_lib/process.js b/process/Org_lib/process.js index 07e4fd606f9230155a197a6d7318653ac46f1db4..05f9696d8177c68a5011af2158dcbabe5572ba9f 100644 --- a/process/Org_lib/process.js +++ b/process/Org_lib/process.js @@ -65,9 +65,9 @@ OrgUtils.openOrgReport = function(pOrgId) .buildSql("select ORGANISATION.INFO from ORGANISATION")); //communication data of the organization - var commSql = "select MEDIUM_ID, ADDR from COMM"; + var commSql = "select MEDIUM_ID, ADDR from COMMUNICATION"; commSql = SqlCondition.begin() - .andPrepare("COMM.RELATION_ID", relationId) + .andPrepare("COMMUNICATION.RELATION_ID", relationId) .and("STANDARD = 1") .buildSql(commSql); var commData = db.table(commSql); @@ -75,7 +75,7 @@ OrgUtils.openOrgReport = function(pOrgId) //resolve keyword commData.forEach(function (row) { - row[0] = KeywordUtils.getViewValue("COMM.MEDIUM", row[0]); + row[0] = KeywordUtils.getViewValue("COMMUNICATION.MEDIUM", row[0]); }); commData = ReportData.begin(["KINDOFCOMM", "COMMVALUE"]).add(commData); @@ -91,7 +91,7 @@ OrgUtils.openOrgReport = function(pOrgId) //TODO: get the keywords in another way when keywords are entitys var mediumIds = []; - var mediums = KeywordUtils.getStandardArrayProps("COMM.MEDIUM"); + var mediums = KeywordUtils.getStandardArrayProps("COMMUNICATION.MEDIUM"); for (let i = 0; i < mediums.length; i++) if ("category" in mediums[i][2] && (mediums[i][2].category == "PHONE" || mediums[i][2].category == "EMAIL")) mediumIds.push(mediums[i][0]); @@ -102,9 +102,9 @@ OrgUtils.openOrgReport = function(pOrgId) _joinArrayVals(persData[i], 0, 4); //join the full name together //select the contact info for every person for phone and mail - var persCommSql = "select MEDIUM_ID, ADDR from COMM"; + var persCommSql = "select MEDIUM_ID, ADDR from COMMUNICATION"; persCommSql = SqlCondition.begin() - .andPrepare("COMM.RELATION_ID", persData[i][5]) + .andPrepare("COMMUNICATION.RELATION_ID", persData[i][5]) .and("MEDIUM_ID in (" + mediumIds + ")") .and("STANDARD = 1") .buildSql(persCommSql); @@ -113,7 +113,7 @@ OrgUtils.openOrgReport = function(pOrgId) //resolve keyword persData[i][3] = persDataComm.map(function (row) { - return KeywordUtils.getViewValue("COMM.MEDIUM", row[0]) + ": " + row[1]; + return KeywordUtils.getViewValue("COMMUNICATION.MEDIUM", row[0]) + ": " + row[1]; } ).join("\n"); } diff --git a/report/RPTJ_OFFER/ribbon/ribbontasks/task_report/customcomponents/button/onClick.js b/report/RPTJ_OFFER/ribbon/ribbontasks/task_report/customcomponents/button/onClick.js index 3674da5ff463c0e22f6bbe585dbc9eb5c845a265..af1a6e61109a4fabc99cb1270a993aa1dad14ca3 100644 --- a/report/RPTJ_OFFER/ribbon/ribbontasks/task_report/customcomponents/button/onClick.js +++ b/report/RPTJ_OFFER/ribbon/ribbontasks/task_report/customcomponents/button/onClick.js @@ -10,7 +10,7 @@ var details = vars.get("$global.RptOfferOrderDetails"); var orgid = db.cell("select ORGANISATION_ID from RELATION where RELATIONID = '" + details[1] + "'"); if (orgid.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] + "'"); + var count = db.cell("select count(*) from COMMUNICATION where medium_id = 3 and STANDARD = 1 and RELATION_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]]] ); @@ -33,7 +33,7 @@ else // Funktion - Person in Firma 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 " + relccid = db.array(db.COLUMN, "select ADDR from COMMUNICATION where MEDIUM_ID = 3 and STANDARD = 1 and " + "RELATION_ID in ('" + relccid.join("','") + "') and RELATION_ID <> '" + reltoid + "'"); if ( reltoid != "" )