mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 01:13:31 +01:00
Redirect e-mail for a merged ticket to the ticket it has been merged to
This commit is contained in:
parent
ffc51f5e8e
commit
da5028d51a
@ -337,9 +337,15 @@ def create_object_from_email_message(message, ticket_id, payload, files, logger)
|
||||
if previous_followup is None and ticket_id is not None:
|
||||
try:
|
||||
ticket = Ticket.objects.get(id=ticket_id)
|
||||
new = False
|
||||
except Ticket.DoesNotExist:
|
||||
ticket = None
|
||||
else:
|
||||
new = False
|
||||
# Check if the ticket has been merged to another ticket
|
||||
if ticket.merged_to:
|
||||
logger.info("Ticket has been merged to %s" % ticket.merged_to.ticket)
|
||||
# Use the ticket in which it was merged to for next operations
|
||||
ticket = ticket.merged_to
|
||||
|
||||
# New issue, create a new <Ticket> instance
|
||||
if ticket is None:
|
||||
|
Loading…
Reference in New Issue
Block a user