From: monishdeb Date: Tue, 13 Aug 2013 11:32:05 +0000 (+0530) Subject: CRM-12689 related fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=40f2fee3e7fd4bf470dff157a38553dc4f706777;p=civicrm-core.git CRM-12689 related fix ---------------------------------------- * CRM-12689: Generalize Additional/limit recipients in Scheduled reminders http://issues.civicrm.org/jira/browse/CRM-12689 --- diff --git a/CRM/Admin/Page/AJAX.php b/CRM/Admin/Page/AJAX.php index 32ed8c6d78..b396cf5bce 100644 --- a/CRM/Admin/Page/AJAX.php +++ b/CRM/Admin/Page/AJAX.php @@ -511,7 +511,7 @@ LIMIT $limit"; $values = CRM_Event_PseudoConstant::participantStatus(); break; - case 'Participant Role': + case 'participant_role': $values = CRM_Event_PseudoConstant::participantRole(); break; diff --git a/CRM/Core/BAO/ActionSchedule.php b/CRM/Core/BAO/ActionSchedule.php index f1ec99fa3e..5542307c9c 100755 --- a/CRM/Core/BAO/ActionSchedule.php +++ b/CRM/Core/BAO/ActionSchedule.php @@ -781,7 +781,7 @@ WHERE reminder.action_schedule_id = %1 AND reminder.action_date_time IS NULL $status = implode(',', $status); if (!CRM_Utils_System::isNull($mapping->entity_recipient)) { - $recipientOptions = CRM_Core_OptionGroup::values($mapping->entity_recipient); + $recipientOptions = CRM_Core_OptionGroup::values($mapping->entity_recipient, FALSE, FALSE, FALSE, NULL, 'name'); } $from = "{$mapping->entity} e"; @@ -840,7 +840,7 @@ WHERE reminder.action_schedule_id = %1 AND reminder.action_date_time IS NULL $rList = implode(',', $rList); switch ($recipientOptions[$actionSchedule->recipient]) { - case 'Participant Role': + case 'participant_role': $where[] = "e.role_id IN ({$rList})"; break; @@ -1153,7 +1153,7 @@ WHERE m.owner_membership_id IS NOT NULL AND if (!CRM_Utils_Array::value($recipientType, $eventContacts)) { return $options; } - if ($eventContacts[$recipientType] == 'Participant Role') { + if ($eventContacts[$recipientType] == 'participant_role') { $options = CRM_Event_PseudoConstant::participantRole(); } break; diff --git a/templates/CRM/Admin/Form/ScheduleReminders.tpl b/templates/CRM/Admin/Form/ScheduleReminders.tpl index d663f1d240..4a46b06022 100644 --- a/templates/CRM/Admin/Form/ScheduleReminders.tpl +++ b/templates/CRM/Admin/Form/ScheduleReminders.tpl @@ -225,7 +225,7 @@ var entity = cj("#entity_0 option:selected").val(); var postUrl = "{/literal}{crmURL p='civicrm/ajax/populateRecipient' h=0}{literal}"; - if(recipientMapping[recipient] == 'Participant Status' || recipientMapping[recipient] == 'Participant Role') { + if(recipientMapping[recipient] == 'Participant Status' || recipientMapping[recipient] == 'participant_role') { var elementID = '#recipient_listing'; cj( elementID ).html(''); cj.post(postUrl, {recipient: recipientMapping[recipient]},