diff --git a/helpdesk/email.py b/helpdesk/email.py index ea90ce65..c87e485c 100644 --- a/helpdesk/email.py +++ b/helpdesk/email.py @@ -24,7 +24,7 @@ from helpdesk import settings from helpdesk.exceptions import DeleteIgnoredTicketException, IgnoreTicketException from helpdesk.lib import process_attachments, safe_template_context from helpdesk.models import FollowUp, IgnoreEmail, Queue, Ticket -from helpdesk.signals import update_ticket_done +from helpdesk.signals import new_ticket_done, update_ticket_done import imaplib import logging import mimetypes @@ -617,7 +617,10 @@ def create_object_from_email_message(message, ticket_id, payload, files, logger) "Message seems to be auto-reply, not sending any emails back to the sender") else: send_info_email(message_id, f, ticket, context, queue, new) - if not new: + if new: + # emit signal when the PublicTicketForm.save is done + new_ticket_done.send(sender="create_object_from_email_message", ticket=ticket) + else: # emit signal with followup when the ticket is updated update_ticket_done.send(sender="create_object_from_email_message", followup=f) return ticket