use activity type id from form object
authorPradeep Nayak <pradpnayak@gmail.com>
Mon, 16 Mar 2020 19:46:13 +0000 (19:46 +0000)
committerPradeep Nayak <pradpnayak@gmail.com>
Tue, 17 Mar 2020 11:07:43 +0000 (11:07 +0000)
CRM/Case/Form/Activity.php

index f6c12e01de37b1dfea8a406964703413a47ffdd1..4c685985d23a04cb3cf5fbf2c8251d314592a87d 100644 (file)
@@ -601,11 +601,7 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity {
             $mailStatus = ts("A copy of the activity has also been sent to selected contact(s).");
           }
           else {
-            $actTypeId = civicrm_api3('Activity', 'getvalue', [
-              'return' => 'activity_type_id',
-              'id' => $vval['actId'],
-            ]);
-            if (!in_array($actTypeId, Civi::settings()->get('do_not_notify_assignees_for'))) {
+            if (!in_array($this->_activityTypeId, Civi::settings()->get('do_not_notify_assignees_for'))) {
               $this->_relatedContacts = CRM_Activity_BAO_ActivityAssignment::getAssigneeNames(
                 [$vval['actId']], TRUE, FALSE
               );