From 26a77d0a55da45f0e8d83431d42d54646e5107ca Mon Sep 17 00:00:00 2001 From: monishdeb Date: Tue, 18 Nov 2014 03:13:37 +0530 Subject: [PATCH] CRM-15536 fix - Scheduled reminders: Clarify "Limit to" and "Also include" UI to prevent user errors https://issues.civicrm.org/jira/browse/CRM-15536 --- CRM/Admin/Form/ScheduleReminders.php | 2 +- CRM/Core/BAO/ActionSchedule.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CRM/Admin/Form/ScheduleReminders.php b/CRM/Admin/Form/ScheduleReminders.php index 1c2eedd1e8..930c4aa206 100644 --- a/CRM/Admin/Form/ScheduleReminders.php +++ b/CRM/Admin/Form/ScheduleReminders.php @@ -424,7 +424,7 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form { $params['group_id'] = $values['group_id']; $params['recipient_manual'] = $params['recipient'] = $params['recipient_listing'] = 'null'; } - elseif (!CRM_Utils_System::isNull($values['recipient_listing'])) { + elseif (!CRM_Utils_System::isNull($values['recipient_listing']) && !CRM_Utils_System::isNull($values['limit_to'])) { $params['recipient'] = CRM_Utils_Array::value('recipient', $values); $params['recipient_listing'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, CRM_Utils_Array::value('recipient_listing', $values) diff --git a/CRM/Core/BAO/ActionSchedule.php b/CRM/Core/BAO/ActionSchedule.php index 54919f0655..da187e73de 100755 --- a/CRM/Core/BAO/ActionSchedule.php +++ b/CRM/Core/BAO/ActionSchedule.php @@ -934,7 +934,12 @@ WHERE reminder.action_schedule_id = %1 AND reminder.action_date_time IS NULL $anniversary = false; if (!CRM_Utils_System::isNull($mapping->entity_recipient)) { - $recipientOptions = CRM_Core_OptionGroup::values($mapping->entity_recipient, FALSE, FALSE, FALSE, NULL, 'name'); + if ($mapping->entity_recipient == 'event_contacts') { + $recipientOptions = CRM_Core_OptionGroup::values($mapping->entity_recipient, FALSE, FALSE, FALSE, NULL, 'name', TRUE, FALSE, 'name'); + } + else { + $recipientOptions = CRM_Core_OptionGroup::values($mapping->entity_recipient, FALSE, FALSE, FALSE, NULL, 'name'); + } } $from = "{$mapping->entity} e"; -- 2.25.1