forked from extern/django-helpdesk
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:
|
if previous_followup is None and ticket_id is not None:
|
||||||
try:
|
try:
|
||||||
ticket = Ticket.objects.get(id=ticket_id)
|
ticket = Ticket.objects.get(id=ticket_id)
|
||||||
new = False
|
|
||||||
except Ticket.DoesNotExist:
|
except Ticket.DoesNotExist:
|
||||||
ticket = None
|
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
|
# New issue, create a new <Ticket> instance
|
||||||
if ticket is None:
|
if ticket is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user