mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-01-14 18:08:40 +01: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'):
|
||||
# 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 not ticket.assigned_to:
|
||||
|
Loading…
Reference in New Issue
Block a user