From 5ebfe248776c3a60b8ce347c5e96c3c079857d6b Mon Sep 17 00:00:00 2001 From: Lars SG Date: Fri, 16 Apr 2021 15:51:26 -0600 Subject: [PATCH] Add " - Copy" to the end of the new mailing name when cloning --- CRM/Mailing/Controller/Send.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Mailing/Controller/Send.php b/CRM/Mailing/Controller/Send.php index 305e9cdcce..cfde095d34 100644 --- a/CRM/Mailing/Controller/Send.php +++ b/CRM/Mailing/Controller/Send.php @@ -49,6 +49,10 @@ class CRM_Mailing_Controller_Send extends CRM_Core_Controller { } if ($mid && !$continue) { $clone = civicrm_api3('Mailing', 'clone', ['id' => $mid]); + civicrm_api3('Mailing', 'create', [ + 'id' => $clone['id'], + 'name' => $clone['values'][$clone['id']]['name'] . " - Copy", + ]); CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/a/', NULL, TRUE, '/mailing/' . $clone['id'])); } } -- 2.25.1