From 72dd949e2eb4aa2aa2a863f52f671b838410590d Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 6 Mar 2015 19:15:43 -0500 Subject: [PATCH] CRM-16063 - CiviMail - Filter civiMails by is_completed --- CRM/Mailing/Info.php | 5 ++++- partials/crmMailing/recipients.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Mailing/Info.php b/CRM/Mailing/Info.php index 3b55e9ce40..ca87b76f65 100644 --- a/CRM/Mailing/Info.php +++ b/CRM/Mailing/Info.php @@ -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); diff --git a/partials/crmMailing/recipients.html b/partials/crmMailing/recipients.html index d3fcc360bf..33b0d6031d 100644 --- a/partials/crmMailing/recipients.html +++ b/partials/crmMailing/recipients.html @@ -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" -- 2.25.1