diff --git a/.liquibase/Data_alias/basic/2019.1.4/alter_appointmentlink.xml b/.liquibase/Data_alias/basic/2019.1.4/alter_appointmentlink.xml new file mode 100644 index 0000000000000000000000000000000000000000..a4afb48c041be2abca239dc5379cfee478cb6e14 --- /dev/null +++ b/.liquibase/Data_alias/basic/2019.1.4/alter_appointmentlink.xml @@ -0,0 +1,21 @@ +<?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="a.schindlbeck" id="7d7de9e8-054a-49b0-986d-ae3a273aed39"> + <!-- Need to drop table and create new on, because columntypes can't be altered --> + <dropTable tableName="AB_APPOINTMENTLINK"/> + <createTable tableName="AB_APPOINTMENTLINK"> + <column name="AB_APPOINTMENTLINK_ID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_AB_APPOINTMENTLINK_AB_APPOINTMENTLINKID"/> + </column> + <column name="APPOINTMENT_ID" type="VARCHAR(512)"> + <constraints nullable="false"/> + </column> + <column name="OBJECT_TYPE" type="VARCHAR(63)"> + <constraints nullable="false"/> + </column> + <column name="OBJECT_ROWID" type="VARCHAR(512)"> + <constraints nullable="false"/> + </column> + </createTable> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2019.1.4/changelog.xml b/.liquibase/Data_alias/basic/2019.1.4/changelog.xml index 4d84cd9089f31098e0c1443f095bb25b2869378c..93cad8dc3e6847dab22e05817b97b3579e7af27e 100644 --- a/.liquibase/Data_alias/basic/2019.1.4/changelog.xml +++ b/.liquibase/Data_alias/basic/2019.1.4/changelog.xml @@ -161,7 +161,6 @@ <include relativeToChangelogFile="true" file="DSGVO/init_dsgvoType_keyword.xml"/> <include relativeToChangelogFile="true" file="DSGVO/init_deadline_keyword.xml"/> <include relativeToChangelogFile="true" file="DSGVO/init_transmission_keyword.xml"/> - <include relativeToChangelogFile="true" file="AditoBasic/init_UnlinkedMail.xml"/> <include relativeToChangelogFile="true" file="Attributes/AB_ATTRIBUTE.xml"/> @@ -175,7 +174,6 @@ <include relativeToChangelogFile="true" file="Salesproject_Phase_icons.xml"/> <include relativeToChangelogFile="true" file="Salesprojectmilestone_add_parent.xml"/> - <include relativeToChangelogFile="true" file="Salesproject_Phase_LongNames.xml"/> - + <include relativeToChangelogFile="true" file="alter_appointmentlink.xml"/> </databaseChangeLog> diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml b/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml deleted file mode 100644 index 83818826decb7b62e72d42f34875cb823311b982..0000000000000000000000000000000000000000 --- a/.liquibase/_____SYSTEMALIAS/basic/init/struct/create_asys_notificationcontents.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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="a.schindlbeck" id="6b25f062-fb39-4230-9348-b67ec5ec45a1"> - <createTable tableName="ASYS_NOTIFICATIONCONTENTS"> - <column name="CONTENTID" type="CHAR(36)"> - <constraints primaryKey="true" primaryKeyName="PK_ASYS_NOTIFICATIONCONTENTS_CONTENTID"/> - </column> - <column name="BACKPACK" type="CLOB"/> - <column name="CAPTION" type="VARCHAR(512)"/> - <column name="CREATIONDATE" type="BIGINT"/> - <column name="DESCRIPTION" type="VARCHAR(1023)"/> - <column name="FORCEDPRIORITY" type="INTEGER"/> - <column name="ICON_INFO" type="VARCHAR(1023)"/> - <column name="LIFETIME" type="BIGINT"/> - <column name="LINK_INFO" type="VARCHAR(1023)"/> - <column name="ORIGINATORNAME" type="VARCHAR(63)"/> - <column name="RECIPIENTUSERIDS" type="CLOB"/> - <column name="TYPECODE" type="VARCHAR(63)"/> - <column name="VERSION" type="INTEGER"/> - </createTable> -</changeSet> -</databaseChangeLog> \ No newline at end of file diff --git a/entity/Address_entity/Address_entity.aod b/entity/Address_entity/Address_entity.aod index acded69b4278affe82fdffeb3cbd39bc7c1406ac..406c1c90115a36fb8a61002418470e395d899e5a 100644 --- a/entity/Address_entity/Address_entity.aod +++ b/entity/Address_entity/Address_entity.aod @@ -399,6 +399,11 @@ </entityParameter> </children> </entityConsumer> + <entityParameter> + <name>ShowDsgvoMessage_param</name> + <valueProcess>%aditoprj%/entity/Address_entity/entityfields/showdsgvomessage_param/valueProcess.js</valueProcess> + <expose v="true" /> + </entityParameter> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Address_entity/entityfields/showdsgvomessage_param/valueProcess.js b/entity/Address_entity/entityfields/showdsgvomessage_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e0f3ec47e2b963a577204e41d9847dd6ad0725a8 --- /dev/null +++ b/entity/Address_entity/entityfields/showdsgvomessage_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string(false); \ No newline at end of file diff --git a/entity/Address_entity/recordcontainers/db/onDBInsert.js b/entity/Address_entity/recordcontainers/db/onDBInsert.js index 3c8fe6b700798f2b5ffcb27ecb96964a338dfdb0..14c04e5fc957168514bd24185fa04f2bea97cd79 100644 --- a/entity/Address_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Address_entity/recordcontainers/db/onDBInsert.js @@ -12,4 +12,4 @@ else if (typeParam === "organisation") new StandardObject("Address", vars.get("$field.ADDRESSID"), scopeType, vars.get("$field.CONTACT_ID")) .onObjectInsert() -DataPrivacyUtils.notifyNeedDataPrivacyUpdate(vars.get("$field.CONTACT_ID")); \ No newline at end of file +DataPrivacyUtils.notifyNeedDataPrivacyUpdate(vars.get("$field.CONTACT_ID"), vars.get("$param.ShowDsgvoMessage_param")); \ No newline at end of file diff --git a/entity/Address_entity/recordcontainers/db/onDBUpdate.js b/entity/Address_entity/recordcontainers/db/onDBUpdate.js index 139a11f67e04f4739281cd7c2bfc53edf1f8b5ed..c20ad6c82f89a2b68f03054caaea4d64a04a20f0 100644 --- a/entity/Address_entity/recordcontainers/db/onDBUpdate.js +++ b/entity/Address_entity/recordcontainers/db/onDBUpdate.js @@ -1,4 +1,4 @@ import("system.vars"); import("DataPrivacy_lib"); -DataPrivacyUtils.notifyNeedDataPrivacyUpdate(vars.get("$field.CONTACT_ID")); \ No newline at end of file +DataPrivacyUtils.notifyNeedDataPrivacyUpdate(vars.get("$field.CONTACT_ID"), vars.get("$param.ShowDsgvoMessage_param")); \ No newline at end of file diff --git a/entity/Appointment_entity/Appointment_entity.aod b/entity/Appointment_entity/Appointment_entity.aod index 88d51bef0b4482bf21b00836aae6bd9acbaa3aea..fbd0525b72c0c8dbf23c393bd105aba34137ef1c 100644 --- a/entity/Appointment_entity/Appointment_entity.aod +++ b/entity/Appointment_entity/Appointment_entity.aod @@ -81,6 +81,7 @@ </entityField> <entityActionGroup> <name>PartStatActionGroup</name> + <stateProcess>%aditoprj%/entity/Appointment_entity/entityfields/partstatactiongroup/stateProcess.js</stateProcess> <children> <entityActionField> <name>accept</name> @@ -181,6 +182,7 @@ <title>Delete recurring appointment</title> <onActionProcess>%aditoprj%/entity/Appointment_entity/entityfields/deleteseries/onActionProcess.js</onActionProcess> <iconId>VAADIN:TRASH</iconId> + <state>AUTO</state> <stateProcess>%aditoprj%/entity/Appointment_entity/entityfields/deleteseries/stateProcess.js</stateProcess> <tooltip>series delete action</tooltip> </entityActionField> diff --git a/entity/Appointment_entity/entityfields/deleteseries/stateProcess.js b/entity/Appointment_entity/entityfields/deleteseries/stateProcess.js index 5b986b88043aff459755d7b43a75d9eff0c6bcb0..f4c74851bc407a263811db26812e1ebfb750bbee 100644 --- a/entity/Appointment_entity/entityfields/deleteseries/stateProcess.js +++ b/entity/Appointment_entity/entityfields/deleteseries/stateProcess.js @@ -1,15 +1,23 @@ +import("system.logging"); import("system.tools"); import("system.vars"); import("system.result"); import("system.calendars"); import("system.neon"); +import("system.text"); var event = JSON.parse(vars.getString("$param.Entry_param")); -if(event != undefined && event != "") //event not empty - if(event[calendars.RECURRENCEID] != undefined && event[calendars.RECURRENCEID] != "") //event recurring appointment - if(event[calendars.ORGANIZER] == tools.getCurrentUser()["title"]) //user == organizer - result.object(neon.COMPONENTSTATE_EDITABLE); +if(event) //event not empty +{ + var ownerCn = event[calendars.USER2]["cn"]; + var currentUserTitle = vars.getString("$sys.user"); + + if(event[calendars.RECURRENCEID] && ownerCn == currentUserTitle) //serientermin und currentUser der TerminOwner + result.object(neon.COMPONENTSTATE_AUTO); else - result.object(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file + result.object(neon.COMPONENTSTATE_INVISIBLE); +} +else + result.object(neon.COMPONENTSTATE_AUTO); \ No newline at end of file diff --git a/entity/Appointment_entity/entityfields/partstatactiongroup/stateProcess.js b/entity/Appointment_entity/entityfields/partstatactiongroup/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..015a529d23da92bac57d9bcfb999a727bd59b0b2 --- /dev/null +++ b/entity/Appointment_entity/entityfields/partstatactiongroup/stateProcess.js @@ -0,0 +1,23 @@ +import("system.calendars"); +import("system.logging"); +import("system.result"); +import("system.vars"); +import("system.tools"); +import("system.neon"); + +if(vars.getString("$param.Entry_param")) +{ + var event = JSON.parse(vars.getString("$param.Entry_param")); + + var ownerCn = event[calendars.USER2]["cn"]; + var currentUserTitle = vars.getString("$sys.user"); + + if(!(event[calendars.ORGANIZER] == currentUserTitle) && currentUserTitle == ownerCn) + result.object(neon.COMPONENTSTATE_AUTO); + else + result.object(neon.COMPONENTSTATE_INVISIBLE); +} +else +{ + result.object(neon.COMPONENTSTATE_AUTO); +} \ No newline at end of file diff --git a/entity/AttributeRelation_entity/AttributeRelation_entity.aod b/entity/AttributeRelation_entity/AttributeRelation_entity.aod index 2d21271d661117341030274948568617105f5acb..5469287f9b417d9c4cb4be0c1df0014393214719 100644 --- a/entity/AttributeRelation_entity/AttributeRelation_entity.aod +++ b/entity/AttributeRelation_entity/AttributeRelation_entity.aod @@ -248,6 +248,11 @@ <expose v="true" /> <documentation>%aditoprj%/entity/AttributeRelation_entity/entityfields/showempty_param/documentation.adoc</documentation> </entityParameter> + <entityParameter> + <name>ShowDsgvoMessage_param</name> + <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/showdsgvomessage_param/valueProcess.js</valueProcess> + <expose v="true" /> + </entityParameter> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/AttributeRelation_entity/entityfields/showdsgvomessage_param/valueProcess.js b/entity/AttributeRelation_entity/entityfields/showdsgvomessage_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e0f3ec47e2b963a577204e41d9847dd6ad0725a8 --- /dev/null +++ b/entity/AttributeRelation_entity/entityfields/showdsgvomessage_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string(false); \ No newline at end of file diff --git a/entity/AttributeRelation_entity/recordcontainers/jdito/onInsert.js b/entity/AttributeRelation_entity/recordcontainers/jdito/onInsert.js index 16e8c985584f30c2e06939d4bc67780ded3818ec..c0c1e90701b86f5651e518b6b188813182f82f7a 100644 --- a/entity/AttributeRelation_entity/recordcontainers/jdito/onInsert.js +++ b/entity/AttributeRelation_entity/recordcontainers/jdito/onInsert.js @@ -33,4 +33,4 @@ if (valueField) db.insertData("AB_ATTRIBUTERELATION", columns, null, values); if (vars.get("$param.ObjectType_param") == "Person") - DataPrivacyUtils.notifyNeedDataPrivacyUpdate(vars.get("$param.ObjectRowId_param")); \ No newline at end of file + DataPrivacyUtils.notifyNeedDataPrivacyUpdate(vars.get("$param.ObjectRowId_param"), vars.get("$param.ShowDsgvoMessage_param")); \ No newline at end of file diff --git a/entity/AttributeRelation_entity/recordcontainers/jdito/onUpdate.js b/entity/AttributeRelation_entity/recordcontainers/jdito/onUpdate.js index e7c491ed85e09891c232a989e929bb4a54466d16..682e3eea290e822bba2dd1ffbfa8d04edd68dd1a 100644 --- a/entity/AttributeRelation_entity/recordcontainers/jdito/onUpdate.js +++ b/entity/AttributeRelation_entity/recordcontainers/jdito/onUpdate.js @@ -63,4 +63,4 @@ else } if (vars.get("$param.ObjectType_param") == "Person") - DataPrivacyUtils.notifyNeedDataPrivacyUpdate(vars.get("$param.ObjectRowId_param")); \ No newline at end of file + DataPrivacyUtils.notifyNeedDataPrivacyUpdate(vars.get("$param.ObjectRowId_param"), vars.get("$param.ShowDsgvoMessage_param")); \ No newline at end of file diff --git a/entity/Communication_entity/Communication_entity.aod b/entity/Communication_entity/Communication_entity.aod index 98fed1da658e89fc37442c586f2491b0a842642a..b002005270ca57c5e2bb0adf6b2d6996276432e9 100644 --- a/entity/Communication_entity/Communication_entity.aod +++ b/entity/Communication_entity/Communication_entity.aod @@ -215,6 +215,11 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <name>DATE_EDIT</name> <valueProcess>%aditoprj%/entity/Communication_entity/entityfields/date_edit/valueProcess.js</valueProcess> </entityField> + <entityParameter> + <name>ShowDsgvoMessage_param</name> + <valueProcess>%aditoprj%/entity/Communication_entity/entityfields/showdsgvomessage_param/valueProcess.js</valueProcess> + <expose v="true" /> + </entityParameter> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Communication_entity/entityfields/showdsgvomessage_param/valueProcess.js b/entity/Communication_entity/entityfields/showdsgvomessage_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e0f3ec47e2b963a577204e41d9847dd6ad0725a8 --- /dev/null +++ b/entity/Communication_entity/entityfields/showdsgvomessage_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string(false); \ No newline at end of file diff --git a/entity/Communication_entity/recordcontainers/db/onDBInsert.js b/entity/Communication_entity/recordcontainers/db/onDBInsert.js index f1126646cf11431f298cfd7b1d4680da502e7927..064879ccf84aa1d2ec5dafc66afc5dda16eed01d 100644 --- a/entity/Communication_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Communication_entity/recordcontainers/db/onDBInsert.js @@ -5,4 +5,4 @@ import("StandardObject_lib"); new StandardObject("Communication", vars.get("$field.COMMUNICATIONID"), "Person", vars.get("$field.CONTACT_ID")) .onCommunicationInsert(vars.get("$field.MEDIUM_ID")); -DataPrivacyUtils.notifyNeedDataPrivacyUpdate(vars.get("$field.CONTACT_ID")); \ No newline at end of file +DataPrivacyUtils.notifyNeedDataPrivacyUpdate(vars.get("$field.CONTACT_ID"), vars.get("$param.ShowDsgvoMessage_param")); \ No newline at end of file diff --git a/entity/Communication_entity/recordcontainers/db/onDBUpdate.js b/entity/Communication_entity/recordcontainers/db/onDBUpdate.js index 53aae3bacf95ea6872280976c46c5e77df29a49d..c6e55a7c46034dbe62bb7037c7cf3ae24c16d8d3 100644 --- a/entity/Communication_entity/recordcontainers/db/onDBUpdate.js +++ b/entity/Communication_entity/recordcontainers/db/onDBUpdate.js @@ -5,4 +5,4 @@ import("StandardObject_lib"); new StandardObject("Communication", vars.get("$field.COMMUNICATIONID"), "Person", vars.get("$field.CONTACT_ID")) .onCommunicationUpdate(vars.get("$field.MEDIUM_ID")); -DataPrivacyUtils.notifyNeedDataPrivacyUpdate(vars.get("$field.CONTACT_ID")); \ No newline at end of file +DataPrivacyUtils.notifyNeedDataPrivacyUpdate(vars.get("$field.CONTACT_ID"), vars.get("$param.ShowDsgvoMessage_param")); \ No newline at end of file diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index 4473553b461f18f9f266a1670bc2e32a731d4152..ebd4ce3c476a1248e4ef24c38a9ae48a9498ce86 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -169,6 +169,10 @@ <valueProcess>%aditoprj%/entity/Person_entity/entityfields/persaddresses/children/contactid_param/valueProcess.js</valueProcess> <expose v="false" /> </entityParameter> + <entityParameter> + <name>ShowDsgvoMessage_param</name> + <valueProcess>%aditoprj%/entity/Person_entity/entityfields/persaddresses/children/showdsgvomessage_param/valueProcess.js</valueProcess> + </entityParameter> </children> </entityConsumer> <entityConsumer> @@ -186,6 +190,10 @@ <description>This parameter is used for specifing a related &quot;CONTACTID&quot; to a COMMUNICATION-entry. Usually this is used for filtering COMMUNICATION-entries by a specified contact or creating a new entry that is related to a contact.</description> </entityParameter> + <entityParameter> + <name>ShowDsgvoMessage_param</name> + <valueProcess>%aditoprj%/entity/Person_entity/entityfields/communications/children/showdsgvomessage_param/valueProcess.js</valueProcess> + </entityParameter> </children> </entityConsumer> <entityConsumer> @@ -514,6 +522,10 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <name>ObjectType_param</name> <valueProcess>%aditoprj%/entity/Person_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess> </entityParameter> + <entityParameter> + <name>ShowDsgvoMessage_param</name> + <valueProcess>%aditoprj%/entity/Person_entity/entityfields/attributes/children/showdsgvomessage_param/valueProcess.js</valueProcess> + </entityParameter> </children> </entityConsumer> <entityConsumer> diff --git a/entity/Person_entity/entityfields/attributes/children/showdsgvomessage_param/valueProcess.js b/entity/Person_entity/entityfields/attributes/children/showdsgvomessage_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..fce9fde135bfde9221a9956f545862641098ff7c --- /dev/null +++ b/entity/Person_entity/entityfields/attributes/children/showdsgvomessage_param/valueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); + +result.string(vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/communications/children/showdsgvomessage_param/valueProcess.js b/entity/Person_entity/entityfields/communications/children/showdsgvomessage_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..fce9fde135bfde9221a9956f545862641098ff7c --- /dev/null +++ b/entity/Person_entity/entityfields/communications/children/showdsgvomessage_param/valueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); + +result.string(vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW); \ No newline at end of file diff --git a/entity/Person_entity/entityfields/persaddresses/children/showdsgvomessage_param/valueProcess.js b/entity/Person_entity/entityfields/persaddresses/children/showdsgvomessage_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..fce9fde135bfde9221a9956f545862641098ff7c --- /dev/null +++ b/entity/Person_entity/entityfields/persaddresses/children/showdsgvomessage_param/valueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); + +result.string(vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW); \ No newline at end of file diff --git a/process/DataPrivacy_lib/process.js b/process/DataPrivacy_lib/process.js index 527b1d0c5e5b51eb90c4ef2f305246578e145e70..315b7f9df0abe35d37aaeda67683a9481c367ed6 100644 --- a/process/DataPrivacy_lib/process.js +++ b/process/DataPrivacy_lib/process.js @@ -1,3 +1,6 @@ +import("system.project"); +import("system.project"); +import("system.logging"); import("Util_lib"); import("PostalAddress_lib"); import("system.text"); @@ -321,8 +324,15 @@ DataPrivacyUtils.collectAll = function(pContactId, pFilterCond) /** * Notify the user to update the data privacy informations */ -DataPrivacyUtils.notifyNeedDataPrivacyUpdate = function(pContactId) +DataPrivacyUtils.notifyNeedDataPrivacyUpdate = function(pContactId, pShowMessage) { + if (pShowMessage == "false" || pShowMessage === false) + return; + + var isActive = JSON.parse(project.getPreferenceValue("custom.dsgvo.active", "true")); + if (!isActive) + return; + if (ContactUtils.getContactTypeByContactId(pContactId) > 1) { // if person // TODO: jump to DataPrivacy-Tab of contact question.showMessage(translate.text("Your changes may have an impact on the data privacy information (DSGVO).\n Please update these."), question.INFORMATION, translate.text("Update data privacy information")); diff --git a/process/WsValidation_lib/process.js b/process/WsValidation_lib/process.js index 45e8e5570ec282ef34ab6639943b29a26b9feb80..dfeb7e0835ca991790f377433728af7be78b6f2f 100644 --- a/process/WsValidation_lib/process.js +++ b/process/WsValidation_lib/process.js @@ -271,7 +271,6 @@ WsValidationUtils.validate = function(pValue, pType, pCountry, pCity) */ WsValidationUtils.setAddressFields = function(pFieldToSetToValue) { - logging.log(JSON.stringify(vars.getString("$this.value"), null, "\t")) try { var data = JSON.parse(vars.getString("$this.value")); @@ -280,11 +279,10 @@ WsValidationUtils.setAddressFields = function(pFieldToSetToValue) // ignore error return } - logging.log(JSON.stringify(typeof data, null, "\t")) var type = typeof data; - // Only an array can be returned by the ws. V-- this check is slow -> check number and string before - if (type == "number" || type == "string" || Object.prototype.toString.call(data) !== '[object Array]') + // Only an array can be returned by the ws. V-- this check is slow -> check if not object before as its faster + if (type != "object" || Object.prototype.toString.call(data) !== '[object Array]') return _setField("$field.ZIP", data[1]);