From 99813a216118210423aeace717e4bc861468a43c Mon Sep 17 00:00:00 2001 From: Daniel Tran <d.tran@adito.de> Date: Thu, 6 May 2021 10:46:34 +0200 Subject: [PATCH] =?UTF-8?q?[Projekt:=20xRM-ContactManagement][TicketNr.:?= =?UTF-8?q?=201079260][Aktivit=C3=A4ten=20die=20zu=20einem=20Kontakt=20mit?= =?UTF-8?q?=20einer=20Firma=20existieren,=20werden=20bei=20Neuanlage=20ein?= =?UTF-8?q?es=20Privaten=20Kontakts=20als=20weiter=20Funktion=20mit=20?= =?UTF-8?q?=C3=BCbernommen]=20-=20Customized=20process,=20to=20fix=20misbe?= =?UTF-8?q?havior=20that=20activities=20=20=20=20=20of=20parent=20contact?= =?UTF-8?q?=20are=20shown=20in=20functions=20(child-contacts).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recordcontainers/db/conditionProcess.js | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/entity/Activity_entity/recordcontainers/db/conditionProcess.js b/entity/Activity_entity/recordcontainers/db/conditionProcess.js index 950fcd1f1dc..c89f50125db 100644 --- a/entity/Activity_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Activity_entity/recordcontainers/db/conditionProcess.js @@ -14,28 +14,9 @@ if (vars.exists("$param.RowId_param") && vars.get("$param.RowId_param") && vars. .and("ACTIVITYLINK.OBJECT_TYPE", "$param.ObjectId_param"); var rowId = vars.get("$param.RowId_param"); - if (vars.get("$param.ObjectId_param") == "Person") - { - //in the Person context, all activities linked to the person should be shown, so it is necessary to get all contactIds of that person - var allPersonRelatedContactIds = newSelect("personContacts.CONTACTID") - .from("CONTACT") - .join("CONTACT", "CONTACT.PERSON_ID = personContacts.PERSON_ID", "personContacts") - .where("CONTACT.CONTACTID", "$param.RowId_param") - .arrayColumn(); - - if (allPersonRelatedContactIds.length === 0) - condition.noResult(); - else - { - activityLinkSubselect.and("ACTIVITYLINK.OBJECT_ROWID", allPersonRelatedContactIds, SqlBuilder.IN()); - condition.and(null, activityLinkSubselect, SqlBuilder.EXISTS()); - } - } - else - { - activityLinkSubselect.and("ACTIVITYLINK.OBJECT_ROWID", "$param.RowId_param"); - condition.and(null, activityLinkSubselect, SqlBuilder.EXISTS()); - } + + activityLinkSubselect.and("ACTIVITYLINK.OBJECT_ROWID", "$param.RowId_param"); + condition.and(null, activityLinkSubselect, SqlBuilder.EXISTS()); } if (vars.exists("$param.ActivityIDs_param") && vars.get("$param.ActivityIDs_param")) -- GitLab