diff --git a/helpdesk/update_ticket.py b/helpdesk/update_ticket.py index f10a33d5..ddd337ee 100644 --- a/helpdesk/update_ticket.py +++ b/helpdesk/update_ticket.py @@ -4,6 +4,7 @@ from django.core.exceptions import ValidationError from django.contrib.auth import get_user_model from django.utils import timezone from django.utils.translation import gettext as _ +import django.dispatch from helpdesk.lib import safe_template_context from helpdesk import settings as helpdesk_settings @@ -20,6 +21,8 @@ from helpdesk.models import ( User = get_user_model() +update_ticket_done = django.dispatch.Signal() + def add_staff_subscription( user: User, ticket: Ticket @@ -387,6 +390,9 @@ def update_ticket( )) ticket.save() + # emit signal with followup when the ticket update is done + update_ticket_done.send(sender="update_ticket", followup=f) + from helpdesk.webhooks import notify_followup_webhooks notify_followup_webhooks(f)