From 78cd9c187850b19c8581385ddc95d4c62f3fa39c Mon Sep 17 00:00:00 2001 From: Ross Poulton Date: Thu, 27 Aug 2009 10:23:44 +0000 Subject: [PATCH] Fixes issue #105: Email template issues. --- fixtures/initial_data.json | 22 +++++++++++----------- models.py | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/fixtures/initial_data.json b/fixtures/initial_data.json index 4ed24f76..ea9c9fe7 100644 --- a/fixtures/initial_data.json +++ b/fixtures/initial_data.json @@ -4,7 +4,7 @@ "model": "helpdesk.emailtemplate", "fields": { "template_name": "assigned_cc", - "html": "

Hello,

\r\n\r\n

This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} ({{ ticket.title }}) for {{ ticket.submitter_email }} has been {% if ticket.assigned_to %}assigned to {{ ticket.assigned_to }}{% else %}unassigned{% endif %}.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
", + "html": "

Hello,

\r\n\r\n

This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} ({{ ticket.title }}) for {{ ticket.submitter_email }} has been {% if ticket.assigned_to %}assigned to {{ ticket.assigned_to }}{% else %}unassigned{% endif %}.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
", "plain_text": "Hello,\r\n\r\nThis is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") for {{ ticket.submitter_email }} has been {% if ticket.assigned_to %}assigned to {{ ticket.assigned_to }}{% else %}unassigned{% endif %}.\r\n\r\nTicket ID: {{ ticket.ticket }}\r\nQueue: {{ queue.title }}\r\nTitle: {{ ticket.title }}\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}\r\nPriority: {{ ticket.get_priority_display }}\r\nStatus: {{ ticket.get_status }}\r\nAssigned to: {{ ticket.get_assigned_to }}\r\nView Online: {{ ticket.staff_url }}\r\n\r\nThe original ticket description was:\r\n\r\n{{ ticket.description }}", "heading": "Ticket Assigned", "subject": "(Assigned)" @@ -15,7 +15,7 @@ "model": "helpdesk.emailtemplate", "fields": { "template_name": "assigned_owner", - "html": "

Hello,

\r\n\r\n

This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} ({{ ticket.title }}) for {{ ticket.submitter_email }} has been assigned to you.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: YOU
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
", + "html": "

Hello,

\r\n\r\n

This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} ({{ ticket.title }}) for {{ ticket.submitter_email }} has been assigned to you.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: YOU
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
", "plain_text": "Hello,\r\n\r\nThis is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") for {{ ticket.submitter_email }} has been assigned to you.\r\n\r\nTicket ID: {{ ticket.ticket }}\r\nQueue: {{ queue.title }}\r\nTitle: {{ ticket.title }}\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}\r\nPriority: {{ ticket.get_priority_display }}\r\nStatus: {{ ticket.get_status }}\r\nAssigned to: YOU\r\nView Online: {{ ticket.staff_url }}\r\n\r\nThe original ticket description was:\r\n\r\n{{ ticket.description }}", "heading": "Ticket Assigned To You", "subject": "(Assigned To You)" @@ -26,7 +26,7 @@ "model": "helpdesk.emailtemplate", "fields": { "template_name": "closed_cc", - "html": "

Hello,

\r\n\r\n

Ticket {{ ticket.title }} ('{{ ticket.title }}'){% if ticket.assigned_to %}, assigned to {{ ticket.get_assigned_to }}{% endif %} has been closed.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
\r\n\r\n

The resolution provided was:

\r\n\r\n
{{ resolution }}
\r\n\r\n

If you wish to view this ticket online, you can visit {{ ticket.staff_url }}.

", + "html": "

Hello,

\r\n\r\n

Ticket {{ ticket.title }} ('{{ ticket.title }}'){% if ticket.assigned_to %}, assigned to {{ ticket.get_assigned_to }}{% endif %} has been closed.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
\r\n\r\n

The resolution provided was:

\r\n\r\n
{{ resolution }}
\r\n\r\n

If you wish to view this ticket online, you can visit {{ ticket.staff_url }}.

", "plain_text": "Hello,\r\n\r\nTicket {{ ticket.title }} (\"{{ ticket.title }}\"){% if ticket.assigned_to %}, assigned to {{ ticket.assigned_to }}{% endif %} has been closed.\r\n\r\nTicket ID: {{ ticket.ticket }}\r\nQueue: {{ queue.title }}\r\nTitle: {{ ticket.title }}\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}\r\nPriority: {{ ticket.get_priority_display }}\r\nStatus: {{ ticket.get_status }}\r\nAssigned to: {{ ticket.get_assigned_to }}\r\nView Online: {{ ticket.staff_url }} (login required)\r\n\r\nThe original description was:\r\n\r\n{{ ticket.description }}\r\n\r\nThe resolution provided was:\r\n\r\n{{ resolution }}", "heading": "Ticket Closed", "subject": "(Closed)" @@ -37,7 +37,7 @@ "model": "helpdesk.emailtemplate", "fields": { "template_name": "closed_owner", - "html": "

Hello,

\r\n\r\n

The following ticket, which is currently assigned to you, has been closed.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
\r\n\r\n

The resolution provided was:

\r\n\r\n
{{ ticket.resolution }}
", + "html": "

Hello,

\r\n\r\n

The following ticket, which is currently assigned to you, has been closed.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
\r\n\r\n

The resolution provided was:

\r\n\r\n
{{ ticket.resolution }}
", "plain_text": "Hello,\r\n\r\nThe following ticket, which is currently assigned to you, has been closed.\r\n\r\nTicket ID: {{ ticket.ticket }}\r\nQueue: {{ queue.title }}\r\nTitle: {{ ticket.title }}\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}\r\nPriority: {{ ticket.get_priority_display }}\r\nStatus: {{ ticket.get_status }}\r\nAssigned to: {{ ticket.get_assigned_to }}\r\nView Online: {{ ticket.staff_url }} (login required)\r\n\r\nIf you wish to view this ticket online, you can visit {{ ticket.staff_url }}.\r\n\r\n", "heading": "Ticket Closed", "subject": "(Closed)" @@ -59,7 +59,7 @@ "model": "helpdesk.emailtemplate", "fields": { "template_name": "escalated_cc", - "html": "

Hello,

\r\n\r\n

This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} ('{{ ticket.title }}') has been escalated automatically.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
", + "html": "

Hello,

\r\n\r\n

This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} ('{{ ticket.title }}') has been escalated automatically.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
", "plain_text": "Hello,\r\n\r\nThis is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") has been escalated automatically.\r\n\r\nTicket ID: {{ ticket.ticket }}\r\nQueue: {{ queue.title }}\r\nTitle: {{ ticket.title }}\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}\r\nPriority: {{ ticket.get_priority_display }}\r\nStatus: {{ ticket.get_status }}\r\nAssigned to: {{ ticket.get_assigned_to }}\r\nView Online: {{ ticket.staff_url }} (login required)\r\n\r\nThe original ticket description was:\r\n\r\n{{ ticket.description }}", "heading": "Ticket Escalated", "subject": "(Escalated)" @@ -70,7 +70,7 @@ "model": "helpdesk.emailtemplate", "fields": { "template_name": "escalated_owner", - "html": "

Hello,

\r\n\r\n

A ticket currently assigned to you has been automatically escalated as it has been open for longer than expected.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
", + "html": "

Hello,

\r\n\r\n

A ticket currently assigned to you has been automatically escalated as it has been open for longer than expected.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
", "plain_text": "Hello,\r\n\r\nA ticket currently assigned to you has been automatically escalated as it has been open for longer than expected.\r\n\r\nTicket ID: {{ ticket.ticket }}\r\nQueue: {{ queue.title }}\r\nTitle: {{ ticket.title }}\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}\r\nPriority: {{ ticket.get_priority_display }}\r\nStatus: {{ ticket.get_status }}\r\nAssigned to: {{ ticket.get_assigned_to }}\r\nView Online: {{ ticket.staff_url }} (login required)\r\n\r\nThe original ticket description was:\r\n\r\n{{ ticket.description }}\r\n\r\nPlease review this ticket and attempt to provide a resolution as soon as possible.", "heading": "Ticket Assigned to You Has Been Escalated", "subject": "(Escalated)" @@ -92,7 +92,7 @@ "model": "helpdesk.emailtemplate", "fields": { "template_name": "newticket_cc", - "html": "

Hello,

\r\n\r\n

This is a courtesy e-mail to let you know that a new ticket has been opened.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Description:

\r\n\r\n
{{ ticket.description }}
", + "html": "

Hello,

\r\n\r\n

This is a courtesy e-mail to let you know that a new ticket has been opened.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Description:

\r\n\r\n
{{ ticket.description }}
", "plain_text": "Hello,\r\n\r\nThis is a courtesy e-mail to let you know that a new ticket has been opened.\r\n\r\nTicket ID: {{ ticket.ticket }}\r\nQueue: {{ queue.title }}\r\nTitle: {{ ticket.title }}\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}\r\nPriority: {{ ticket.get_priority_display }}\r\nStatus: {{ ticket.get_status }}\r\nView Online: {{ ticket.staff_url }} (login required)\r\n\r\nDescription:\r\n{{ ticket.description }}\r\n", "heading": "New Ticket Opened", "subject": "(Opened)" @@ -114,7 +114,7 @@ "model": "helpdesk.emailtemplate", "fields": { "template_name": "resolved_cc", - "html": "

Hello,

\r\n\r\n

The following ticket has been resolved.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
\r\n\r\n

The resolution that was added was:

\r\n\r\n
{{ ticket.resolution }}
\r\n\r\n

This resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.

", + "html": "

Hello,

\r\n\r\n

The following ticket has been resolved.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
\r\n\r\n

The resolution that was added was:

\r\n\r\n
{{ ticket.resolution }}
\r\n\r\n

This resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.

", "plain_text": "Hello,\r\n\r\nThe following ticket has been resolved:\r\n\r\nTicket ID: {{ ticket.ticket }}\r\nQueue: {{ queue.title }}\r\nTitle: {{ ticket.title }}\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}\r\nPriority: {{ ticket.get_priority_display }}\r\nStatus: {{ ticket.get_status }}\r\nAssigned to: {{ ticket.get_assigned_to }}\r\nView Online: {{ ticket.staff_url }} (login required)\r\n\r\nThe original ticket description was:\r\n\r\n{{ ticket.description }}\r\n\r\nThe resolution provided was:\r\n\r\n{{ ticket.resolution }}\r\n\r\nThis resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.", "heading": "Ticket Resolved", "subject": "(Resolved)" @@ -125,7 +125,7 @@ "model": "helpdesk.emailtemplate", "fields": { "template_name": "resolved_owner", - "html": "

Hello,

\r\n\r\n

A ticket currently assigned to you has been resolved.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
\r\n\r\n

The resolution that was added was:

\r\n\r\n
{{ ticket.resolution }}
\r\n\r\n

This resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.

", + "html": "

Hello,

\r\n\r\n

A ticket currently assigned to you has been resolved.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
\r\n\r\n

The resolution that was added was:

\r\n\r\n
{{ ticket.resolution }}
\r\n\r\n

This resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.

", "plain_text": "Hello,\r\n\r\nA ticket currently assigned to you has been resolved.\r\n\r\nTicket ID: {{ ticket.ticket }}\r\nQueue: {{ queue.title }}\r\nTitle: {{ ticket.title }}\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}\r\nPriority: {{ ticket.get_priority_display }}\r\nStatus: {{ ticket.get_status }}\r\nAssigned to: {{ ticket.get_assigned_to }}\r\nView Online: {{ ticket.staff_url }} (login required)\r\n\r\nThe original ticket description was:\r\n\r\n{{ ticket.description }}\r\n\r\nThe resolution provided was:\r\n\r\n{{ ticket.resolution }}\r\n\r\nThis resolution has been e-mailed to the submitter, who will verify it before you can close this ticket.", "heading": "Ticket Resolved", "subject": "(Resolved)" @@ -147,7 +147,7 @@ "model": "helpdesk.emailtemplate", "fields": { "template_name": "updated_cc", - "html": "

Hello,

\r\n\r\n

This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") for {{ ticket.submitter_email }} has been updated.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
\r\n\r\n

The following comment was added:

\r\n\r\n
{{ comment }}
\r\n\r\n

This information has {% if private %}not {% endif %} been e-mailed to the submitter.

", + "html": "

Hello,

\r\n\r\n

This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") for {{ ticket.submitter_email }} has been updated.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
\r\n\r\n

The following comment was added:

\r\n\r\n
{{ comment }}
\r\n\r\n

This information has {% if private %}not {% endif %} been e-mailed to the submitter.

", "plain_text": "Hello,\r\n\r\nThis is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") for {{ ticket.submitter_email }} has been updated.\r\n\r\nTicket ID: {{ ticket.ticket }}\r\nQueue: {{ queue.title }}\r\nTitle: {{ ticket.title }}\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}\r\nPriority: {{ ticket.get_priority_display }}\r\nStatus: {{ ticket.get_status }}\r\nAssigned to: {{ ticket.get_assigned_to }}\r\nView Online: {{ ticket.staff_url }} (login required)\r\n\r\nOriginal description:\r\n\r\n{{ ticket.description }}\r\n\r\nThe following comment was added:\r\n\r\n{{ comment }}\r\n\r\nThis information has {% if private %}not {% endif %} been e-mailed to the submitter.\r\n\r\nIf you wish to view this ticket online, you can visit {{ ticket.staff_url }}.", "heading": "Ticket Updated", "subject": "(Updated)" @@ -158,7 +158,7 @@ "model": "helpdesk.emailtemplate", "fields": { "template_name": "updated_owner", - "html": "

Hello,

\r\n\r\n

This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") for {{ ticket.submitter_email }}, which is assigned to you, has been updated.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
\r\n\r\n

The following comment was added:

\r\n\r\n
{{ comment }}
\r\n\r\n

This information has {% if private %}not {% endif %} been e-mailed to the submitter.

", + "html": "

Hello,

\r\n\r\n

This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") for {{ ticket.submitter_email }}, which is assigned to you, has been updated.

\r\n\r\n

\r\nTicket ID: {{ ticket.ticket }}
\r\nQueue: {{ queue.title }}
\r\nTitle: {{ ticket.title }}
\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}
\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}
\r\nPriority: {{ ticket.get_priority_display }}
\r\nStatus: {{ ticket.get_status }}
\r\nAssigned to: {{ ticket.get_assigned_to }}
\r\nView Online to update this ticket (login required)

\r\n\r\n

Just for reference, the original ticket description was:

\r\n\r\n
{{ ticket.description }}
\r\n\r\n

The following comment was added:

\r\n\r\n
{{ comment }}
\r\n\r\n

This information has {% if private %}not {% endif %} been e-mailed to the submitter.

", "plain_text": "Hello,\r\n\r\nThis is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} (\"{{ ticket.title }}\") for {{ ticket.submitter_email }}, which is assigned to you, has been updated.\r\n\r\nTicket ID: {{ ticket.ticket }}\r\nQueue: {{ queue.title }}\r\nTitle: {{ ticket.title }}\r\nOpened: {{ ticket.created|date:\"l N jS Y, \\a\\t P\" }}\r\nSubmitter: {{ ticket.submitter_email|default:\"Unknown\" }}\r\nPriority: {{ ticket.get_priority_display }}\r\nStatus: {{ ticket.get_status }}\r\nAssigned to: {{ ticket.get_assigned_to }}\r\nView Online: {{ ticket.staff_url }} (login required)\r\n\r\nOriginal description:\r\n\r\n{{ ticket.description }}\r\n\r\nThe following comment was added:\r\n\r\n{{ comment }}\r\n\r\nThis information has {% if private %}not {% endif %} been e-mailed to the submitter.\r\n\r\nIf you wish to view this ticket online, you can visit {{ ticket.staff_url }}.", "heading": "Ticket Updated", "subject": "(Updated)" diff --git a/models.py b/models.py index b54f4764..72b285f6 100644 --- a/models.py +++ b/models.py @@ -331,7 +331,7 @@ class Ticket(models.Model): if self.assigned_to.get_full_name(): return self.assigned_to.get_full_name() else: - return self.assigned_to + return self.assigned_to.username get_assigned_to = property(_get_assigned_to) def _get_ticket(self):