diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 3d3cced20b13..766da13306e0 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -1600,11 +1600,19 @@ public static function add(&$params, $ids = array()) { ) { $params['replyto_email'] = $params['from_email']; } - $mailing->copyValues($params); + // CRM-20892 Unset Modifed Date here so that MySQL can correctly set an updated modfied date. + unset($mailing->modified_date); $result = $mailing->save(); + // CRM-20892 Re find record after saing so we can set the updated modified date in the result. + $mailing->find(TRUE); + + if (isset($mailing->modified_date)) { + $result->modified_date = $mailing->modified_date; + } + if (!empty($ids['mailing'])) { CRM_Utils_Hook::post('edit', 'Mailing', $mailing->id, $mailing); }