Skip to content
Snippets Groups Projects
Commit b06d550c authored by Peter Rotich's avatar Peter Rotich
Browse files

Task email templates

parent d383856c
Branches
Tags
No related merge requests found
......@@ -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');
}
......
......@@ -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();
......
......@@ -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>
......
......@@ -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>
......@@ -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>
......
#
# 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>
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment