* Add templates for escalation

* E-mail owner, Queue CC and submitter on escalation
This commit is contained in:
Ross Poulton 2008-01-22 06:10:48 +00:00
parent 274b9300f4
commit 224ad8722f
7 changed files with 77 additions and 0 deletions

View File

@ -61,6 +61,20 @@ def escalate_tickets(queues, verbose):
t.priority -= 1 t.priority -= 1
t.save() t.save()
context = {
'ticket': t,
'queue': queue,
}
if t.submitter_email:
send_multipart_mail('helpdesk/emails/submitter_escalated', context, '%s %s' % (t.ticket, t.title), t.submitter_email, t.queue.from_address)
if t.queue.updated_ticket_cc:
send_multipart_mail('helpdesk/emails/cc_escalated', context, '%s %s' % (t.ticket, t.title), t.queue.updated_ticket_cc, t.queue.from_address)
if t.assigned_to:
send_multipart_mail('helpdesk/emails/owner_escalated', context, '%s %s' % (t.ticket, t.title), t.assigned_to, t.queue.from_address)
if verbose: if verbose:
print " - Esclating %s from %s>%s" % (t.ticket, t.priority+1, t.priority) print " - Esclating %s from %s>%s" % (t.ticket, t.priority+1, t.priority)

View File

@ -0,0 +1,10 @@
{% extends "helpdesk/emails/base.html" %}
{% block header %}Ticket Escalated{% endblock %}
{% block content %}
<p style='font-family: "Trebuchet MS", Arial, sans-serif; font-size: 11pt;'>Hello,</p>
<p style='font-family: "Trebuchet MS", Arial, sans-serif; font-size: 11pt;'>This is a courtesy e-mail to let you know that ticket <a href='{{ ticket.staff_url }}'><b>{{ ticket.ticket }}</b></a> (<em>{{ ticket.title }}</em>) has been escalated automatically.</p>
{% endblock %}

View File

@ -0,0 +1,7 @@
Hello,
This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} ("{{ ticket.title }}") has been escalated automatically.
You can view this online at {{ ticket.staff_url }}.
{% include "helpdesk/emails/text_footer.txt" %}

View File

@ -0,0 +1,14 @@
{% extends "helpdesk/emails/base.html" %}
{% block header %}Ticket Escalated{% endblock %}
{% block content %}
<p style='font-family: "Trebuchet MS", Arial, sans-serif; font-size: 11pt;'>Hello,</p>
<p style='font-family: "Trebuchet MS", Arial, sans-serif; font-size: 11pt;'>A ticket currently assigned to you with a subject of <i>{{ ticket.title }}</i> has been automatically escalated.</p>
<p style='font-family: "Trebuchet MS", Arial, sans-serif; font-size: 11pt;'>Please review this ticket and attempt to provide a resolution as soon as possible.</p>
<p style='font-family: "Trebuchet MS", Arial, sans-serif; font-size: 11pt;'>If you wish to view this ticket online, you can visit <a href="{{ ticket.get_staff_url }}">{{ ticket.get_staff_url }}</a>.</p>
{% endblock %}

View File

@ -0,0 +1,9 @@
Hello,
A ticket currently assigned to you with a subject of "{{ ticket.title }}" has been automatically escalated.
Please review this ticket and attempt to provide a resolution as soon as possible.
If you wish to view this ticket online, you can visit {{ ticket.get_staff_url }}.
{% include "helpdesk/emails/text_footer.txt" %}

View File

@ -0,0 +1,14 @@
{% extends "helpdesk/emails/base.html" %}
{% block header %}Your Ticket Has Been Escalated{% endblock %}
{% block content %}
<p style='font-family: "Trebuchet MS", Arial, sans-serif; font-size: 11pt;'>Hello,</p>
<p style='font-family: "Trebuchet MS", Arial, sans-serif; font-size: 11pt;'>You recently logged a ticket with a subject of <i>{{ ticket.title }}</i> with us. This e-mail is to advise you of an automated escalation of that ticket.</p>
<p style='font-family: "Trebuchet MS", Arial, sans-serif; font-size: 11pt;'>We will review your ticket shortly and attempt to provide a resolution as soon as possible.</p>
<p style='font-family: "Trebuchet MS", Arial, sans-serif; font-size: 11pt;'>If you wish to view this ticket online, you can visit <a href="{{ ticket.get_ticket_url }}">{{ ticket.get_ticket_url }}</a>.</p>
{% endblock %}

View File

@ -0,0 +1,9 @@
Hello,</p>
You recently logged a ticket with a subject of "{{ ticket.title }}" with us. This e-mail is to advise you of an automated escalation of that ticket.
We will review your ticket shortly and attempt to provide a resolution as soon as possible.
If you wish to view this ticket online, you can visit {{ ticket.get_ticket_url }}.
{% include "helpdesk/emails/text_footer.txt" %}