From 5965a3d24b8a64f3cae345c0c4521cf3b1e87968 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Thu, 27 Sep 2012 02:05:08 -0400 Subject: [PATCH] Add %{title} variable to internal note alert template --- include/class.ticket.php | 2 +- include/upgrader/sql/15b30765-7f35de42.patch.sql | 2 +- setup/inc/sql/osTicket-mysql.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/class.ticket.php b/include/class.ticket.php index bd5553ca1..ec3ec6a15 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -1559,7 +1559,7 @@ class Ticket { if($tpl && ($msg=$tpl->getNoteAlertMsgTemplate()) && $email) { - $msg = $this->replaceVars($msg, array('note' => "$title\n\n$note")); + $msg = $this->replaceVars($msg, array('title' => $title, 'note' => $note)); // Alert recipients $recipients=array(); diff --git a/include/upgrader/sql/15b30765-7f35de42.patch.sql b/include/upgrader/sql/15b30765-7f35de42.patch.sql index 80eb122c1..e3e20db9f 100644 --- a/include/upgrader/sql/15b30765-7f35de42.patch.sql +++ b/include/upgrader/sql/15b30765-7f35de42.patch.sql @@ -361,7 +361,7 @@ UPDATE `%TABLE_PREFIX%email_template` `ticket_reply_body` = REPLACE(`ticket_reply_body`, '%note', '%{note}'), `ticket_alert_body` = REPLACE(`ticket_alert_body`, '%note', '%{note}'), `message_alert_body` = REPLACE(`message_alert_body`, '%note', '%{note}'), - `note_alert_body` = REPLACE(`note_alert_body`, '%note', '%{note}'), + `note_alert_body` = REPLACE(`note_alert_body`, '%note', '%{title}\r\n%{note}'), `assigned_alert_body` = REPLACE(`assigned_alert_body`, '%note', '%{note}'), `transfer_alert_body` = REPLACE(`transfer_alert_body`, '%note', '%{note}'), `ticket_overlimit_body` = REPLACE(`ticket_overlimit_body`, '%note', '%{note}'); diff --git a/setup/inc/sql/osTicket-mysql.sql b/setup/inc/sql/osTicket-mysql.sql index b1f2fd1ee..30808383e 100644 --- a/setup/inc/sql/osTicket-mysql.sql +++ b/setup/inc/sql/osTicket-mysql.sql @@ -318,7 +318,7 @@ CREATE TABLE `%TABLE_PREFIX%email_template` ( -- TODO: Dump revised copy before release!!! INSERT INTO `%TABLE_PREFIX%email_template` (`tpl_id`, `cfg_id`, `isactive`, `name`, `notes`, `ticket_autoresp_subj`, `ticket_autoresp_body`, `ticket_notice_subj`, `ticket_notice_body`, `ticket_alert_subj`, `ticket_alert_body`, `message_autoresp_subj`, `message_autoresp_body`, `message_alert_subj`, `message_alert_body`, `note_alert_subj`, `note_alert_body`, `assigned_alert_subj`, `assigned_alert_body`, `transfer_alert_subj`, `transfer_alert_body`, `ticket_overdue_subj`, `ticket_overdue_body`, `ticket_overlimit_subj`, `ticket_overlimit_body`, `ticket_reply_subj`, `ticket_reply_body`, `created`, `updated`) VALUES -(1, 1, 1, 'osTicket Default Template', 'Default osTicket templates', 'Support Ticket Opened [#%{ticket.number}]', '%{ticket.name},\r\n\r\nA request for support has been created and assigned ticket #%{ticket.number}. A representative will follow-up with you as soon as possible.\r\n\r\nYou can view this ticket''s progress online here: %{url}/view.php?e=%{ticket.email}&t=%{ticket.number}.\r\n\r\nIf you wish to send additional comments or information regarding this issue, please don''t open a new ticket. Simply login using the link above and update the ticket.\r\n\r\n%{signature}', '[#%{ticket.number}] %{ticket.subject}', '%{ticket.name},\r\n\r\nOur customer care team has created a ticket, #%{ticket.number} on your behalf, with the following message.\r\n\r\n%{message}\r\n\r\nIf you wish to provide additional comments or information regarding this issue, please don''t open a new ticket. You can update or view this ticket''s progress online here: %{url}/view.php?e=%{ticket.email}&t=%{ticket.number}.\r\n\r\n%{signature}', 'New Ticket Alert', '%{recipient},\r\n\r\nNew ticket #%{ticket.number} created.\r\n-------------------\r\nName: %{ticket.name}\r\nEmail: %{ticket.email}\r\nDept: %{ticket.dept.name}\r\n\r\n%{message}\r\n-------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', '[#%{ticket.number}] Message Added', '%{ticket.name},\r\n\r\nYour reply to support request #%{ticket.number} has been noted.\r\n\r\nYou can view this support request progress online here: %{url}/view.php?e=%{ticket.email}&t=%{ticket.number}.\r\n\r\n%{signature}', 'New Message Alert', '%{recipient},\r\n\r\nNew message appended to ticket #%{ticket.number}\r\n\r\n----------------------\r\nName: %{ticket.name}\r\nEmail: %{ticket.email}\r\nDept: %{ticket.dept.name}\r\n\r\n%{message}\r\n-------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', 'New Internal Note Alert', '%{recipient},\r\n\r\nInternal note appended to ticket #%{ticket.number}\r\n\r\n----------------------\r\nName: %{ticket.name}\r\n\r\n%{note}\r\n-------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', 'Ticket #%{ticket.number} Assigned to you', '%{assignee},\r\n\r\n%{assigner} has assigned ticket #%{ticket.number} to you or one of your teams!\r\n\r\n%{note}\r\n\r\nTo view complete details, simply login to the support system.\r\n\r\n%{url}/scp/tickets.php?id=%{ticket.id}\r\n\r\n- Your friendly Support Ticket System - powered by osTicket.', 'Ticket Transfer #%{ticket.number} - %{ticket.dept.name}', '%{recipient},\r\n\r\nTicket #%{ticket.number} has been transferred to %{ticket.dept.name} department\r\n\r\n----------------------\r\n\r\n%{note}\r\n\r\n-------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n%{url}/scp/ticket.php?id=%{ticket.id}\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', 'Stale Ticket Alert', '%{recipient},\r\n\r\nA ticket, #%{ticket.number} assigned to you or in your department is seriously overdue.\r\n\r\n%{url}/scp/tickets.php?id=%{ticket.id}\r\n\r\nWe should all work hard to guarantee that all tickets are being addressed in a timely manner.\r\n\r\n\r\n- Your friendly (although with limited patience) Support Ticket System - powered by osTicket.', 'Open Tickets Limit Reached', '%{ticket.name}\r\n\r\nYou have reached the maximum number of open tickets allowed.\r\n\r\nTo be able to open another ticket, one of your pending tickets must be closed. To update or add comments to an open ticket simply login using the link below.\r\n\r\n%{url}/view.php?e=%{ticket.email}\r\n\r\nThank you.\r\n\r\nSupport Ticket System', '[#%{ticket.number}] %{ticket.subject}', '%{ticket.name},\r\n\r\nA customer support staff member has replied to your support request, #%{ticket.number} with the following response:\r\n\r\n%{response}\r\n\r\nWe hope this response has sufficiently answered your questions. If not, please do not send another email. Instead, reply to this email or login to your account for a complete archive of all your support requests and responses.\r\n\r\n%{url}/view.php?e=%{ticket.email}&t=%{ticket.number}\r\n\r\n%{signature}', '2011-08-05 17:00:03', '2012-03-19 01:44:54'); +(1, 1, 1, 'osTicket Default Template', 'Default osTicket templates', 'Support Ticket Opened [#%{ticket.number}]', '%{ticket.name},\r\n\r\nA request for support has been created and assigned ticket #%{ticket.number}. A representative will follow-up with you as soon as possible.\r\n\r\nYou can view this ticket''s progress online here: %{url}/view.php?e=%{ticket.email}&t=%{ticket.number}.\r\n\r\nIf you wish to send additional comments or information regarding this issue, please don''t open a new ticket. Simply login using the link above and update the ticket.\r\n\r\n%{signature}', '[#%{ticket.number}] %{ticket.subject}', '%{ticket.name},\r\n\r\nOur customer care team has created a ticket, #%{ticket.number} on your behalf, with the following message.\r\n\r\n%{message}\r\n\r\nIf you wish to provide additional comments or information regarding this issue, please don''t open a new ticket. You can update or view this ticket''s progress online here: %{url}/view.php?e=%{ticket.email}&t=%{ticket.number}.\r\n\r\n%{signature}', 'New Ticket Alert', '%{recipient},\r\n\r\nNew ticket #%{ticket.number} created.\r\n-------------------\r\nName: %{ticket.name}\r\nEmail: %{ticket.email}\r\nDept: %{ticket.dept.name}\r\n\r\n%{message}\r\n-------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', '[#%{ticket.number}] Message Added', '%{ticket.name},\r\n\r\nYour reply to support request #%{ticket.number} has been noted.\r\n\r\nYou can view this support request progress online here: %{url}/view.php?e=%{ticket.email}&t=%{ticket.number}.\r\n\r\n%{signature}', 'New Message Alert', '%{recipient},\r\n\r\nNew message appended to ticket #%{ticket.number}\r\n\r\n----------------------\r\nName: %{ticket.name}\r\nEmail: %{ticket.email}\r\nDept: %{ticket.dept.name}\r\n\r\n%{message}\r\n-------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', 'New Internal Note Alert', '%{recipient},\r\n\r\nInternal note appended to ticket #%{ticket.number}\r\n\r\n----------------------\r\nName: %{ticket.name}\r\n\r\n%{title}\r\n%{note}\r\n-------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', 'Ticket #%{ticket.number} Assigned to you', '%{assignee},\r\n\r\n%{assigner} has assigned ticket #%{ticket.number} to you or one of your teams!\r\n\r\n%{note}\r\n\r\nTo view complete details, simply login to the support system.\r\n\r\n%{url}/scp/tickets.php?id=%{ticket.id}\r\n\r\n- Your friendly Support Ticket System - powered by osTicket.', 'Ticket Transfer #%{ticket.number} - %{ticket.dept.name}', '%{recipient},\r\n\r\nTicket #%{ticket.number} has been transferred to %{ticket.dept.name} department\r\n\r\n----------------------\r\n\r\n%{note}\r\n\r\n-------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n%{url}/scp/ticket.php?id=%{ticket.id}\r\n\r\n- Your friendly Customer Support System - powered by osTicket.', 'Stale Ticket Alert', '%{recipient},\r\n\r\nA ticket, #%{ticket.number} assigned to you or in your department is seriously overdue.\r\n\r\n%{url}/scp/tickets.php?id=%{ticket.id}\r\n\r\nWe should all work hard to guarantee that all tickets are being addressed in a timely manner.\r\n\r\n\r\n- Your friendly (although with limited patience) Support Ticket System - powered by osTicket.', 'Open Tickets Limit Reached', '%{ticket.name}\r\n\r\nYou have reached the maximum number of open tickets allowed.\r\n\r\nTo be able to open another ticket, one of your pending tickets must be closed. To update or add comments to an open ticket simply login using the link below.\r\n\r\n%{url}/view.php?e=%{ticket.email}\r\n\r\nThank you.\r\n\r\nSupport Ticket System', '[#%{ticket.number}] %{ticket.subject}', '%{ticket.name},\r\n\r\nA customer support staff member has replied to your support request, #%{ticket.number} with the following response:\r\n\r\n%{response}\r\n\r\nWe hope this response has sufficiently answered your questions. If not, please do not send another email. Instead, reply to this email or login to your account for a complete archive of all your support requests and responses.\r\n\r\n%{url}/view.php?e=%{ticket.email}&t=%{ticket.number}\r\n\r\n%{signature}', '2011-08-05 17:00:03', '2012-03-19 01:44:54'); DROP TABLE IF EXISTS `%TABLE_PREFIX%file`; CREATE TABLE `%TABLE_PREFIX%file` ( -- GitLab