fix issue #4770
authorErik Hommel <erik.hommel@civicoop.org>
Tue, 14 Nov 2023 10:04:16 +0000 (11:04 +0100)
committerGitHub <noreply@github.com>
Tue, 14 Nov 2023 10:04:16 +0000 (11:04 +0100)
Making sure the followup_assignee_contact_id is an array so all assignees are saved, not just the first one

CRM/Activity/BAO/Activity.php

index 8405e21c4bfeadadedbda92044973df5cd9b1617..4f85b7ae0f5adbc8703161a103851dc1a83f8ebf 100644 (file)
@@ -1830,6 +1830,9 @@ AND cl.modified_id  = c.id
     $followupParams['activity_type_id'] = $params['followup_activity_type_id'];
     // Get Subject of Follow-up Activiity, CRM-4491
     $followupParams['subject'] = $params['followup_activity_subject'] ?? NULL;
+    if (!is_array($params['followup_assignee_contact_id'])) {
+      $params['followup_assignee_contact_id'] = explode(",", $params['followup_assignee_contact_id']);
+    }
     $followupParams['assignee_contact_id'] = $params['followup_assignee_contact_id'] ?? NULL;
 
     // Create target contact for followup.