From: Eileen McNaughton Date: Wed, 3 Dec 2014 00:18:22 +0000 (+1300) Subject: CRM-15678 don't record reminder send activity if not sent X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8e0ae7515cd614e36d6d4c896449dd9de451bf5b;p=civicrm-core.git CRM-15678 don't record reminder send activity if not sent --- diff --git a/CRM/Core/BAO/ActionSchedule.php b/CRM/Core/BAO/ActionSchedule.php index 45bd673f8d..b3a33e2dbe 100755 --- a/CRM/Core/BAO/ActionSchedule.php +++ b/CRM/Core/BAO/ActionSchedule.php @@ -875,7 +875,7 @@ WHERE reminder.action_schedule_id = %1 AND reminder.action_date_time IS NULL CRM_Core_BAO_ActionLog::create($logParams); // insert activity log record if needed - if ($actionSchedule->record_activity) { + if ($actionSchedule->record_activity && !$isError) { $activityParams = array( 'subject' => $actionSchedule->title, 'details' => $actionSchedule->body_html, @@ -887,7 +887,7 @@ WHERE reminder.action_schedule_id = %1 AND reminder.action_date_time IS NULL 'activity_type_id' => $activityTypeID, 'source_record_id' => $dao->entityID, ); - $activity = CRM_Activity_BAO_Activity::create($activityParams); + CRM_Activity_BAO_Activity::create($activityParams); } }