CRM-16063 - CiviMail - Filter civiMails by is_completed
authorColeman Watts <coleman@civicrm.org>
Sat, 7 Mar 2015 00:15:43 +0000 (19:15 -0500)
committerColeman Watts <coleman@civicrm.org>
Sat, 7 Mar 2015 01:10:06 +0000 (20:10 -0500)
CRM/Mailing/Info.php
partials/crmMailing/recipients.html

index 3b55e9ce403ed99c479ded3a2e418b9e5b3b1e69..ca87b76f65d3063a5781ee86ce1991652d3730df 100644 (file)
@@ -96,7 +96,10 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
     $contactID = $session->get('userID');
 
     $params = array('options' => array('limit' => 0));
-    $civiMails = civicrm_api3('Mailing', 'get', $params + array('return' => array('id', 'name', 'scheduled_date')));
+    $civiMails = civicrm_api3('Mailing', 'get', $params + array(
+      'is_completed' => 1,
+      'return' => array('id', 'name', 'scheduled_date'),
+    ));
     $campNames = civicrm_api3('Campaign', 'get', $params);
     $groupNames = civicrm_api3('Group', 'get', $params);
     $headerfooterList = civicrm_api3('MailingComponent', 'get', $params);
index d3fcc360bf294524e316e5d0349514b5007ae283..33b0d6031d68ae9decc8bf560b4d171358506929 100644 (file)
@@ -9,7 +9,7 @@
     ng-model="mailing.recipients"
     crm-mandatory-groups="crmMailingConst.groupNames | filter:{is_hidden:1}"
     crm-avail-groups="crmMailingConst.groupNames | filter:isMailingList | filter:{is_hidden:0}"
-    crm-avail-mailings="crmMailingConst.civiMails | filter:{is_completed:1}"
+    crm-avail-mailings="crmMailingConst.civiMails"
     crm-ui-id="{{crmMailingBlockRecipients.id}}"
     name="{{crmMailingBlockRecipients.name}}"
     ng-required="true"