mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-20 09:37:48 +02:00
fixed the "take" link when viewing a ticket to create a proper follow up
This commit is contained in:
parent
70a2cd9271
commit
85bf169025
@ -137,8 +137,16 @@ def view_ticket(request, ticket_id):
|
|||||||
|
|
||||||
if request.GET.has_key('take'):
|
if request.GET.has_key('take'):
|
||||||
# Allow the user to assign the ticket to themselves whilst viewing it.
|
# Allow the user to assign the ticket to themselves whilst viewing it.
|
||||||
ticket.assigned_to = request.user
|
|
||||||
ticket.save()
|
# Trick the update_ticket() view into thinking it's being called with
|
||||||
|
# a valid POST.
|
||||||
|
request.POST = {
|
||||||
|
'owner': request.user.id,
|
||||||
|
'public': 1,
|
||||||
|
'title': ticket.title,
|
||||||
|
'comment': ''
|
||||||
|
}
|
||||||
|
return update_ticket(request, ticket_id)
|
||||||
|
|
||||||
if request.GET.has_key('close') and ticket.status == Ticket.RESOLVED_STATUS:
|
if request.GET.has_key('close') and ticket.status == Ticket.RESOLVED_STATUS:
|
||||||
if not ticket.assigned_to:
|
if not ticket.assigned_to:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user