From d177291409371ed71f4a23e833cb464d2609a2a8 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 19 Apr 2013 08:54:24 +0200 Subject: [PATCH] Now using mail template ..._cc for informing cc addresses. --- helpdesk/views/staff.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py index 0fa4b45b..b4b1b8f5 100644 --- a/helpdesk/views/staff.py +++ b/helpdesk/views/staff.py @@ -492,15 +492,17 @@ def update_ticket(request, ticket_id, public=False): if f.new_status == Ticket.RESOLVED_STATUS: - template = 'resolved_submitter' + template = 'resolved_' elif f.new_status == Ticket.CLOSED_STATUS: - template = 'closed_submitter' + template = 'closed_' else: - template = 'updated_submitter' + template = 'updated_' + + template_suffix = 'submitter' if ticket.submitter_email: send_templated_mail( - template, + template + template_suffix, context, recipients=ticket.submitter_email, sender=ticket.queue.from_address, @@ -509,10 +511,12 @@ def update_ticket(request, ticket_id, public=False): ) messages_sent_to.append(ticket.submitter_email) + template_suffix = 'cc' + for cc in ticket.ticketcc_set.all(): if cc.email_address not in messages_sent_to: send_templated_mail( - template, + template + template_suffix, context, recipients=cc.email_address, sender=ticket.queue.from_address,