diff --git a/include/class.template.php b/include/class.template.php index f3a459f6de0855b27c0aca7647107d2733e8481e..bc998c8516240abb0f0b8dc24ee21433e96f675a 100644 --- a/include/class.template.php +++ b/include/class.template.php @@ -136,32 +136,49 @@ class EmailTemplateGroup { 'group'=>'c.task', 'name'=>/* @trans */ 'New Task Alert', 'desc'=>/* @trans */ 'Alert sent to agents, if enabled, on new task.', + 'context' => array( + 'task', 'recipient', 'message', + ), ), 'task.activity.notice' => array( 'group'=>'c.task', 'name'=>/* @trans */ 'New Activity Notice', - 'desc'=>/* @trans */ 'Template used to notify collaborators on task activity.' + 'desc'=>/* @trans */ 'Template used to notify collaborators on task activity.', + 'context' => array( + 'task', 'signature', 'message', 'poster', 'recipient', + ), ), 'task.activity.alert'=>array( 'group'=>'c.task', 'name'=>/* @trans */ 'New Activity Alert', 'desc'=>/* @trans */ 'Alert sent to selected agents, if enabled, on new activity.', - + 'context' => array( + 'task', 'recipient', 'note', 'comments', 'activity', + ), ), 'task.assignment.alert' => array( 'group'=>'c.task', 'name'=>/* @trans */ 'Task Assignment Alert', 'desc'=>/* @trans */ 'Alert sent to agents on task assignment.', + 'context' => array( + 'task', 'recipient', 'comments', 'assignee', 'assigner', + ), ), 'task.transfer.alert'=>array( 'group'=>'c.task', 'name'=>/* @trans */ 'Task Transfer Alert', 'desc'=>/* @trans */ 'Alert sent to agents on task transfer.', + 'context' => array( + 'task', 'recipient', 'note', 'comments', 'activity', + ), ), 'task.overdue.alert'=>array( 'group'=>'c.task', 'name'=>/* @trans */ 'Overdue Task Alert', 'desc'=>/* @trans */ 'Alert sent to agents on stale or overdue task.', + 'context' => array( + 'task', 'recipient', 'comments', + ), ), ); @@ -337,6 +354,10 @@ class EmailTemplateGroup { return $this->getMsgTemplate('task.alert'); } + function getTaskActivityAlertMsgTemplate() { + return $this->getMsgTemplate('task.activity.alert'); + } + function getTaskActivityNoticeMsgTemplate() { return $this->getMsgTemplate('task.activity.notice'); } diff --git a/include/class.variable.php b/include/class.variable.php index 8c10fc61c76d245e9c7c0f2ad4ee1a6ca5ed184e..76acb1d0f2d2d789e312ee4554db8c40b0e4b630 100644 --- a/include/class.variable.php +++ b/include/class.variable.php @@ -262,7 +262,7 @@ class VariableReplacer { return false; $contextTypes = array( - 'activity' => __('Type of recent activity'), + 'activity' => array('class' => 'ThreadActivity', 'desc' => __('Type of recent activity')), 'assignee' => array('class' => 'Staff', 'desc' => __('Assigned agent/team')), 'assigner' => array('class' => 'Staff', 'desc' => __('Agent performing the assignment')), 'comments' => __('Assign/transfer comments'), @@ -276,6 +276,7 @@ class VariableReplacer { 'signature' => 'Selected staff or department signature', 'staff' => array('class' => 'Staff', 'desc' => 'Agent originating the activity'), 'ticket' => array('class' => 'Ticket', 'desc' => 'The ticket'), + 'task' => array('class' => 'Task', 'desc' => 'The task'), 'user' => array('class' => 'User', 'desc' => __('Message recipient')), ); $context = array(); diff --git a/include/i18n/en_US/templates/email/task.activity.alert.yaml b/include/i18n/en_US/templates/email/task.activity.alert.yaml index 82e7c4ce04474cf4214844d8492560074451dc1d..5c94582edca104cdacf12fb1b2333933d7b09206 100644 --- a/include/i18n/en_US/templates/email/task.activity.alert.yaml +++ b/include/i18n/en_US/templates/email/task.activity.alert.yaml @@ -13,34 +13,12 @@ notes: | or visits the web portal and posts a new message there. subject: | - New Activity Alert + Task Activity [#%{task.number}] - %{activity.title} body: | <h3><strong>Hi %{recipient.name},</strong></h3> - New message appended to task <a - href="%{ticket.staff_link}">#%{task.number}</a> + Task <a href="%{task.staff_link}">#%{task.number}</a> updated: %{activity.description} <br> <br> - <table> - <tbody> - <tr> - <td> - <strong>Title</strong>: - </td> - <td> - %{task.title} - </td> - </tr> - <tr> - <td> - <strong>Department</strong>: - </td> - <td> - %{task.dept.name} - </td> - </tr> - </tbody> - </table> - <br> %{message} <br> <br> diff --git a/include/i18n/en_US/templates/email/task.activity.notice.yaml b/include/i18n/en_US/templates/email/task.activity.notice.yaml index 45d1e3e51aecdf64851b0f54fc230f71824be969..750e4a09cd5c892ad1ec5e756bd1fbf368651e7b 100644 --- a/include/i18n/en_US/templates/email/task.activity.notice.yaml +++ b/include/i18n/en_US/templates/email/task.activity.notice.yaml @@ -5,7 +5,7 @@ # --- notes: | - Notice sent to collaborators on task activity e.g note or message. + Notice sent to collaborators on task activity e.g reply or message. subject: | Re: %{task.title} [#%{task.number}] @@ -20,9 +20,6 @@ body: | <br> <hr> <div style="color: rgb(127, 127, 127); font-size: small; text-align: center;"> - <em>You're getting this email because you are a collaborator - on task <a href="%{recipient.task_link}" style="color: rgb(84, 141, 212);" - >#%{task.number}</a>. To participate, simply reply to this email - or <a href="%{recipient.task_link}" style="color: rgb(84, 141, 212);" - >click here</a> for a complete archive of the task thread.</em> + <em>You're getting this email because you are a collaborator on task + #%{task.number}. To participate, simply reply to this email.</em> </div> diff --git a/include/i18n/en_US/templates/email/task.alert.yaml b/include/i18n/en_US/templates/email/task.alert.yaml index 08e311fe09f322b8c5606fb1d4e28d8d614aa678..ee6760803c6bb1d052603f1feb9ce3675399ffdf 100644 --- a/include/i18n/en_US/templates/email/task.alert.yaml +++ b/include/i18n/en_US/templates/email/task.alert.yaml @@ -12,7 +12,7 @@ subject: | New Task Alert body: | <h2>Hi %{recipient.name},</h2> - New task #%{task.number} created + New task <a href="%{task.staff_link}">#%{task.number}</a> created <br> <br> <table> diff --git a/include/i18n/en_US/templates/email/task.assignment.alert.yaml b/include/i18n/en_US/templates/email/task.assignment.alert.yaml index 4c509b08bb812f629966688d727e09a494256ac9..2a8684c51d65ceac087757a2778285f1d215ab94 100644 --- a/include/i18n/en_US/templates/email/task.assignment.alert.yaml +++ b/include/i18n/en_US/templates/email/task.assignment.alert.yaml @@ -1,7 +1,7 @@ # # Email template: task.assignment.alert.yaml # -# Sent to agents when a ticket is assigned to them or the team to which +# Sent to agents when a task is assigned to them or the team to which # they belong. # Use %{assigner} to distinguish who made the assignment. # @@ -18,19 +18,6 @@ body: | assigned to you by %{assigner.name.short} <br> <br> - <table> - <tbody> - <tr> - <td> - <strong>Title</strong>: - </td> - <td> - %{task.title} - </td> - </tr> - </tbody> - </table> - <br> %{comments} <br> <br> diff --git a/include/i18n/en_US/templates/email/task.overdue.alert.yaml b/include/i18n/en_US/templates/email/task.overdue.alert.yaml index 0b48a7337e04efd6dbdf6c0f8c7cfeb15d7b463f..05a8573d3a52b88f9b8d153daba9c4ef313e779f 100644 --- a/include/i18n/en_US/templates/email/task.overdue.alert.yaml +++ b/include/i18n/en_US/templates/email/task.overdue.alert.yaml @@ -2,14 +2,12 @@ # Email template: task.overdue.alert.yaml # # Sent to agents when a tasks transitions to overdue in the system. -# Overdue tasks occur based on set due-date as well as the SLA -# defined for the task. +# Overdue tasks occur based on set due-date. # --- notes: | Sent to agents when a task transitions to overdue in the system. - Overdue tasks occur based on the set due-date as well as the SLA - defined for the task. + Overdue tasks occur based on the set due-date. subject: | Stale Task Alert