CRM-12689 related fix
authormonishdeb <monish.deb@webaccess.co.in>
Tue, 13 Aug 2013 11:32:05 +0000 (17:02 +0530)
committermonishdeb <monish.deb@webaccess.co.in>
Tue, 13 Aug 2013 11:32:05 +0000 (17:02 +0530)
----------------------------------------
* CRM-12689: Generalize Additional/limit recipients in Scheduled reminders
  http://issues.civicrm.org/jira/browse/CRM-12689

CRM/Admin/Page/AJAX.php
CRM/Core/BAO/ActionSchedule.php
templates/CRM/Admin/Form/ScheduleReminders.tpl

index 32ed8c6d78ee5a7ede3dd0acc01fbe9a9c5f7e50..b396cf5bcefe2df31e771470b60abfb100bb47a8 100644 (file)
@@ -511,7 +511,7 @@ LIMIT $limit";
         $values = CRM_Event_PseudoConstant::participantStatus();
         break;
 
-      case 'Participant Role':
+      case 'participant_role':
         $values = CRM_Event_PseudoConstant::participantRole();
         break;
 
index f1ec99fa3e6516f9840ae296310cf64bbd6c35c1..5542307c9ce7904e5b65fc8f949de301666710e9 100755 (executable)
@@ -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;
index d663f1d24009b193e244ccad925e6f3ade11e6b2..4a46b0602278992dc0b7cb11e711b196d53eefe0 100644 (file)
     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]},