Issue #1235 - Escalation only notify users

This commit is contained in:
DavidVadnais 2025-02-03 20:59:39 +00:00
parent 43a71e89f7
commit f43e0474a7

View File

@ -33,9 +33,17 @@ class Command(BaseCommand):
default=False, default=False,
help='Display escalated tickets' help='Display escalated tickets'
) )
parser.add_argument(
'-n',
'--notify-only',
action='store_true',
default=False,
help='Send email reminder but dont escalate tickets'
)
def handle(self, *args, **options): def handle(self, *args, **options):
verbose = options['escalate_verbosely'] verbose = options['escalate_verbosely']
notify_only = options['notify_only']
queue_slugs = options['queues'] queue_slugs = options['queues']
# Only include queues with escalation configured # Only include queues with escalation configured
@ -87,6 +95,7 @@ class Command(BaseCommand):
if verbose: if verbose:
self.stdout.write(f" - Esclating {ticket.ticket} from {ticket.priority + 1}>{ticket.priority}") self.stdout.write(f" - Esclating {ticket.ticket} from {ticket.priority + 1}>{ticket.priority}")
if not notify_only:
followup = ticket.followup_set.create( followup = ticket.followup_set.create(
title=_('Ticket Escalated'), title=_('Ticket Escalated'),
public=True, public=True,