From 9a30d940eee1d62e57d1a5db7a8651b46cc7a674 Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" Date: Fri, 3 Aug 2018 17:31:17 +0100 Subject: [PATCH] Set activity params correctly when filing an activity on case --- CRM/Activity/Page/AJAX.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CRM/Activity/Page/AJAX.php b/CRM/Activity/Page/AJAX.php index 63d342f291..4a53288813 100644 --- a/CRM/Activity/Page/AJAX.php +++ b/CRM/Activity/Page/AJAX.php @@ -302,8 +302,8 @@ class CRM_Activity_Page_AJAX { $mainActivity->activity_date_time = $actDateTime; // Make sure this is current revision. $mainActivity->is_current_revision = TRUE; - // Drop all relations. - $mainActivity->parent_id = $mainActivity->original_id = NULL; + $mainActivity->original_id = $otherActivity->id; + $otherActivity->is_current_revision = FALSE; $mainActivity->save(); $mainActivityId = $mainActivity->id; @@ -327,7 +327,6 @@ class CRM_Activity_Page_AJAX { 1 => $params['caseID'], )) . ' ' . $otherActivity->subject; } - $otherActivity->activity_date_time = $actDateTime; $otherActivity->save(); $caseActivity->free(); -- 2.25.1