mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-26 16:48:50 +01:00
Merge commit 'a4e6f086c8928e77baa73a25b7e8000fb6261498' into django-1.8
* commit 'a4e6f086c8928e77baa73a25b7e8000fb6261498': Include attachments to cc'd users on ticket update From gettatr to get, because dict doesn't contatin attributes. More readable if statement.
This commit is contained in:
commit
8f585aef1c
@ -202,7 +202,7 @@ class API:
|
||||
|
||||
context = safe_template_context(ticket)
|
||||
context['comment'] = f.comment
|
||||
|
||||
|
||||
messages_sent_to = []
|
||||
|
||||
if public and ticket.submitter_email:
|
||||
@ -237,14 +237,20 @@ class API:
|
||||
)
|
||||
messages_sent_to.append(ticket.queue.updated_ticket_cc)
|
||||
|
||||
if ticket.assigned_to and self.request.user != ticket.assigned_to and getattr(ticket.assigned_to.usersettings.settings, 'email_on_ticket_apichange', False) and ticket.assigned_to.email and ticket.assigned_to.email not in messages_sent_to:
|
||||
if (
|
||||
ticket.assigned_to and
|
||||
self.request.user != ticket.assigned_to and
|
||||
ticket.assigned_to.usersettings.settings.get('email_on_ticket_apichange', False) and
|
||||
ticket.assigned_to.email and
|
||||
ticket.assigned_to.email not in messages_sent_to
|
||||
):
|
||||
send_templated_mail(
|
||||
'updated_owner',
|
||||
context,
|
||||
recipients=ticket.assigned_to.email,
|
||||
sender=ticket.queue.from_address,
|
||||
fail_silently=True,
|
||||
)
|
||||
)
|
||||
|
||||
ticket.save()
|
||||
|
||||
@ -276,7 +282,7 @@ class API:
|
||||
context['resolution'] = f.comment
|
||||
|
||||
subject = '%s %s (Resolved)' % (ticket.ticket, ticket.title)
|
||||
|
||||
|
||||
messages_sent_to = []
|
||||
|
||||
if ticket.submitter_email:
|
||||
|
@ -512,6 +512,7 @@ def update_ticket(request, ticket_id, public=False):
|
||||
recipients=cc.email_address,
|
||||
sender=ticket.queue.from_address,
|
||||
fail_silently=True,
|
||||
files=files,
|
||||
)
|
||||
messages_sent_to.append(cc.email_address)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user