mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-08-14 01:58:28 +02:00
almost auto-fix on misc files
This commit is contained in:
@ -28,6 +28,7 @@ from helpdesk.lib import send_templated_mail, safe_template_context
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
||||
def __init__(self):
|
||||
BaseCommand.__init__(self)
|
||||
|
||||
@ -40,7 +41,7 @@ class Command(BaseCommand):
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Display a list of dates excluded'),
|
||||
)
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
verbose = False
|
||||
@ -88,17 +89,17 @@ def escalate_tickets(queues, verbose):
|
||||
print("Processing: %s" % q)
|
||||
|
||||
for t in q.ticket_set.filter(
|
||||
Q(status=Ticket.OPEN_STATUS)
|
||||
| Q(status=Ticket.REOPENED_STATUS)
|
||||
).exclude(
|
||||
priority=1
|
||||
).filter(
|
||||
Q(on_hold__isnull=True)
|
||||
| Q(on_hold=False)
|
||||
).filter(
|
||||
Q(last_escalation__lte=req_last_escl_date)
|
||||
| Q(last_escalation__isnull=True, created__lte=req_last_escl_date)
|
||||
):
|
||||
Q(status=Ticket.OPEN_STATUS) |
|
||||
Q(status=Ticket.REOPENED_STATUS)
|
||||
).exclude(
|
||||
priority=1
|
||||
).filter(
|
||||
Q(on_hold__isnull=True) |
|
||||
Q(on_hold=False)
|
||||
).filter(
|
||||
Q(last_escalation__lte=req_last_escl_date) |
|
||||
Q(last_escalation__isnull=True, created__lte=req_last_escl_date)
|
||||
):
|
||||
|
||||
t.last_escalation = timezone.now()
|
||||
t.priority -= 1
|
||||
@ -113,7 +114,7 @@ def escalate_tickets(queues, verbose):
|
||||
recipients=t.submitter_email,
|
||||
sender=t.queue.from_address,
|
||||
fail_silently=True,
|
||||
)
|
||||
)
|
||||
|
||||
if t.queue.updated_ticket_cc:
|
||||
send_templated_mail(
|
||||
@ -122,7 +123,7 @@ def escalate_tickets(queues, verbose):
|
||||
recipients=t.queue.updated_ticket_cc,
|
||||
sender=t.queue.from_address,
|
||||
fail_silently=True,
|
||||
)
|
||||
)
|
||||
|
||||
if t.assigned_to:
|
||||
send_templated_mail(
|
||||
@ -131,14 +132,14 @@ def escalate_tickets(queues, verbose):
|
||||
recipients=t.assigned_to.email,
|
||||
sender=t.queue.from_address,
|
||||
fail_silently=True,
|
||||
)
|
||||
)
|
||||
|
||||
if verbose:
|
||||
print(" - Esclating %s from %s>%s" % (
|
||||
t.ticket,
|
||||
t.priority+1,
|
||||
t.priority + 1,
|
||||
t.priority
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
f = FollowUp(
|
||||
|
Reference in New Issue
Block a user