From 2c1e4dc1822c0bfef2a21cbd00aa9dce8aaccd78 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 19 Dec 2014 19:06:03 -0800 Subject: [PATCH] CRM-15578 - Mailing.submit API - Accept "approval_note" --- api/v3/Mailing.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index 222002d44c..d20a79f564 100755 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -62,6 +62,7 @@ function civicrm_api3_mailing_create($params, $ids = array()) { unset($params['approval_date']); unset($params['approver_id']); unset($params['approval_status_id']); + unset($params['approval_note']); } } return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); @@ -132,6 +133,8 @@ function _civicrm_api3_mailing_submit_spec(&$spec) { $spec['id'] = $mailingFields['id']; $spec['scheduled_date'] = $mailingFields['scheduled_date']; $spec['approval_date'] = $mailingFields['approval_date']; + $spec['approval_status_id'] = $mailingFields['approval_status_id']; + $spec['approval_note'] = $mailingFields['approval_note']; } /** @@ -164,6 +167,9 @@ function civicrm_api3_mailing_submit($params) { $updateParams['approver_id'] = CRM_Core_Session::getLoggedInContactID(); $updateParams['approval_status_id'] = CRM_Utils_Array::value('approval_status_id', $updateParams, CRM_Core_OptionGroup::getDefaultValue('mail_approval_status')); } + if (isset($params['approval_note'])) { + $updateParams['approval_note'] = $params['approval_note']; + } $updateParams['options']['reload'] = 1; return civicrm_api3('Mailing', 'create', $updateParams); -- 2.25.1