mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-05-21 01:40:44 +02:00
Fix issue #78: Sending mail to a closed ticket does NOT reopen the ticket
This has now changed, emailing a closed ticket changes it to 'Reopened'. Thanks to mdornseif for the suggestion.
This commit is contained in:
parent
506d915704
commit
06fe35e944
@ -242,6 +242,10 @@ def ticket_from_message(message, queue, quiet):
|
|||||||
new = True
|
new = True
|
||||||
update = ''
|
update = ''
|
||||||
|
|
||||||
|
elif t.status == Ticket.CLOSED_STATUS:
|
||||||
|
t.status = Ticket.REOPENED_STATUS
|
||||||
|
t.save()
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
'ticket': t,
|
'ticket': t,
|
||||||
'queue': queue,
|
'queue': queue,
|
||||||
@ -276,6 +280,9 @@ def ticket_from_message(message, queue, quiet):
|
|||||||
fail_silently=True,
|
fail_silently=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
else:
|
||||||
|
if t.status == Ticket.REOPENED_STATUS:
|
||||||
|
update = _(' (Reopened')
|
||||||
else:
|
else:
|
||||||
update = _(' (Updated)')
|
update = _(' (Updated)')
|
||||||
|
|
||||||
@ -304,6 +311,11 @@ def ticket_from_message(message, queue, quiet):
|
|||||||
public = True,
|
public = True,
|
||||||
comment = body,
|
comment = body,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if t.status == Ticket.REOPENED_STATUS:
|
||||||
|
f.new_status = Ticket.REOPENED_STATUS
|
||||||
|
f.title = _('Ticket Re-Opened by E-Mail Received from %(sender_email)s' % {'sender_email': sender_email})
|
||||||
|
|
||||||
f.save()
|
f.save()
|
||||||
|
|
||||||
if not quiet:
|
if not quiet:
|
||||||
|
Loading…
Reference in New Issue
Block a user