mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-05-29 22:19:05 +02:00
[GH-93] re-applying changes...
This commit is contained in:
parent
8f0824af1a
commit
1f00eef6d0
@ -251,61 +251,6 @@ def ticket_from_message(message, queue, quiet):
|
|||||||
t.status = Ticket.REOPENED_STATUS
|
t.status = Ticket.REOPENED_STATUS
|
||||||
t.save()
|
t.save()
|
||||||
|
|
||||||
context = safe_template_context(t)
|
|
||||||
|
|
||||||
if new:
|
|
||||||
|
|
||||||
if sender_email:
|
|
||||||
send_templated_mail(
|
|
||||||
'newticket_submitter',
|
|
||||||
context,
|
|
||||||
recipients=sender_email,
|
|
||||||
sender=queue.from_address,
|
|
||||||
fail_silently=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
if queue.new_ticket_cc:
|
|
||||||
send_templated_mail(
|
|
||||||
'newticket_cc',
|
|
||||||
context,
|
|
||||||
recipients=queue.new_ticket_cc,
|
|
||||||
sender=queue.from_address,
|
|
||||||
fail_silently=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
if queue.updated_ticket_cc and queue.updated_ticket_cc != queue.new_ticket_cc:
|
|
||||||
send_templated_mail(
|
|
||||||
'newticket_cc',
|
|
||||||
context,
|
|
||||||
recipients=queue.updated_ticket_cc,
|
|
||||||
sender=queue.from_address,
|
|
||||||
fail_silently=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
else:
|
|
||||||
if t.status == Ticket.REOPENED_STATUS:
|
|
||||||
update = _(' (Reopened)')
|
|
||||||
else:
|
|
||||||
update = _(' (Updated)')
|
|
||||||
|
|
||||||
if t.assigned_to:
|
|
||||||
send_templated_mail(
|
|
||||||
'updated_owner',
|
|
||||||
context,
|
|
||||||
recipients=t.assigned_to.email,
|
|
||||||
sender=queue.from_address,
|
|
||||||
fail_silently=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
if queue.updated_ticket_cc:
|
|
||||||
send_templated_mail(
|
|
||||||
'updated_cc',
|
|
||||||
context,
|
|
||||||
recipients=queue.updated_ticket_cc,
|
|
||||||
sender=queue.from_address,
|
|
||||||
fail_silently=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
f = FollowUp(
|
f = FollowUp(
|
||||||
ticket = t,
|
ticket = t,
|
||||||
title = _('E-Mail Received from %(sender_email)s' % {'sender_email': sender_email}),
|
title = _('E-Mail Received from %(sender_email)s' % {'sender_email': sender_email}),
|
||||||
@ -338,6 +283,64 @@ def ticket_from_message(message, queue, quiet):
|
|||||||
if not quiet:
|
if not quiet:
|
||||||
print " - %s" % filename
|
print " - %s" % filename
|
||||||
|
|
||||||
|
|
||||||
|
context = safe_template_context(t)
|
||||||
|
|
||||||
|
if new:
|
||||||
|
|
||||||
|
if sender_email:
|
||||||
|
send_templated_mail(
|
||||||
|
'newticket_submitter',
|
||||||
|
context,
|
||||||
|
recipients=sender_email,
|
||||||
|
sender=queue.from_address,
|
||||||
|
fail_silently=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
if queue.new_ticket_cc:
|
||||||
|
send_templated_mail(
|
||||||
|
'newticket_cc',
|
||||||
|
context,
|
||||||
|
recipients=queue.new_ticket_cc,
|
||||||
|
sender=queue.from_address,
|
||||||
|
fail_silently=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
if queue.updated_ticket_cc and queue.updated_ticket_cc != queue.new_ticket_cc:
|
||||||
|
send_templated_mail(
|
||||||
|
'newticket_cc',
|
||||||
|
context,
|
||||||
|
recipients=queue.updated_ticket_cc,
|
||||||
|
sender=queue.from_address,
|
||||||
|
fail_silently=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
else:
|
||||||
|
context.update(comment=f.comment)
|
||||||
|
|
||||||
|
if t.status == Ticket.REOPENED_STATUS:
|
||||||
|
update = _(' (Reopened)')
|
||||||
|
else:
|
||||||
|
update = _(' (Updated)')
|
||||||
|
|
||||||
|
if t.assigned_to:
|
||||||
|
send_templated_mail(
|
||||||
|
'updated_owner',
|
||||||
|
context,
|
||||||
|
recipients=t.assigned_to.email,
|
||||||
|
sender=queue.from_address,
|
||||||
|
fail_silently=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
if queue.updated_ticket_cc:
|
||||||
|
send_templated_mail(
|
||||||
|
'updated_cc',
|
||||||
|
context,
|
||||||
|
recipients=queue.updated_ticket_cc,
|
||||||
|
sender=queue.from_address,
|
||||||
|
fail_silently=True,
|
||||||
|
)
|
||||||
|
|
||||||
return t
|
return t
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user