From 246c4e42eb842fd82c756ff8723c138412935a79 Mon Sep 17 00:00:00 2001
From: "j.goderbauer" <j.goderbauer@adito.de>
Date: Wed, 19 Feb 2020 16:03:12 +0000
Subject: [PATCH] =?UTF-8?q?fix=20#1051912:=20360=C2=B0=20Degree=20did=20no?=
 =?UTF-8?q?t=20show=20entries=20of=20person=20contacts?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

(cherry picked from commit 554832d277fa076977b836d2428cfc144d6f338c)
---
 .../children/objecttype_param/valueProcess.js         |  4 +++-
 .../children/objectrowid_param/valueProcess.js        | 11 +++++------
 .../360DegreeFilter_view/360DegreeFilter_view.aod     |  1 +
 3 files changed, 9 insertions(+), 7 deletions(-)

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 4df09cf5d2..86503dcd7f 100644
--- a/entity/360Degree_entity/entityfields/organisationobjects/children/objecttype_param/valueProcess.js
+++ b/entity/360Degree_entity/entityfields/organisationobjects/children/objecttype_param/valueProcess.js
@@ -1,4 +1,6 @@
 import("system.vars");
 import("system.result");
 
-result.object(["Salesproject", "Offer", "Order", "Contract", "Campaign", "SupportTicket"]);
\ No newline at end of file
+//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
diff --git a/entity/Organisation_entity/entityfields/360degreeobjects/children/objectrowid_param/valueProcess.js b/entity/Organisation_entity/entityfields/360degreeobjects/children/objectrowid_param/valueProcess.js
index fec3c0746a..3080fcea47 100644
--- a/entity/Organisation_entity/entityfields/360degreeobjects/children/objectrowid_param/valueProcess.js
+++ b/entity/Organisation_entity/entityfields/360degreeobjects/children/objectrowid_param/valueProcess.js
@@ -2,10 +2,9 @@ import("Sql_lib");
 import("system.vars");
 import("system.result");
 
-var person_contactids = newSelect( "CONTACTID" )
-                     .from("CONTACT")
-                     .where("CONTACT.ORGANISATION_ID", vars.getString("$field.ORGANISATIONID"))
-                     .and("CONTACT.PERSON_ID is null")
-                     .arrayColumn();
+var contactids = newSelect( "CONTACTID" )
+        .from("CONTACT")
+        .where("CONTACT.ORGANISATION_ID", vars.getString("$field.ORGANISATIONID"))
+        .arrayColumn();
 
-result.string( JSON.stringify([vars.getString("$field.CONTACTID")].concat(person_contactids)) );
\ No newline at end of file
+result.string( JSON.stringify(contactids) );
\ No newline at end of file
diff --git a/neonView/360DegreeFilter_view/360DegreeFilter_view.aod b/neonView/360DegreeFilter_view/360DegreeFilter_view.aod
index 2a908ab94a..964ace654b 100644
--- a/neonView/360DegreeFilter_view/360DegreeFilter_view.aod
+++ b/neonView/360DegreeFilter_view/360DegreeFilter_view.aod
@@ -25,6 +25,7 @@
       <dateField>DATE</dateField>
       <titleField>TITLE</titleField>
       <descriptionField>ENTITY_NAME</descriptionField>
+      <iconIdField>ICON</iconIdField>
       <entityField>#ENTITY</entityField>
     </timelineViewTemplate>
   </children>
-- 
GitLab