fix error

This commit is contained in:
BOYA,CHIU 2021-08-03 12:14:55 +08:00
parent 247db7fb3c
commit 106b5db942
1 changed files with 6 additions and 6 deletions

View File

@ -97,7 +97,7 @@ class Admin::TicketsManageController < OrbitAdminController
end
def changecategory
ticket = Ticket.find(params[:ticket_id]) rescue nil
ticket = Ticket.find(params[:tickets_manage_id]) rescue nil
category = Category.find(params[:category_id]) rescue nil
if !category.nil?
ticket.category_id = category.id
@ -107,7 +107,7 @@ class Admin::TicketsManageController < OrbitAdminController
end
def start
ticket = Ticket.find(params[:ticket_id]) rescue nil
ticket = Ticket.find(params[:tickets_manage_id]) rescue nil
ticket.status = "commenced"
ticket.taken_by = current_user.id
ticket.save
@ -115,7 +115,7 @@ class Admin::TicketsManageController < OrbitAdminController
end
def close
ticket = Ticket.find(params[:ticket_id]) rescue nil
ticket = Ticket.find(params[:tickets_manage_id]) rescue nil
ticket.status = "closed"
ticket.urgent = false
ticket.save
@ -123,7 +123,7 @@ class Admin::TicketsManageController < OrbitAdminController
end
def leave
ticket = Ticket.find(params[:ticket_id]) rescue nil
ticket = Ticket.find(params[:tickets_manage_id]) rescue nil
ticket.status = "open"
ticket.taken_by = nil
ticket.save
@ -131,7 +131,7 @@ class Admin::TicketsManageController < OrbitAdminController
end
def reopen
ticket = Ticket.find(params[:ticket_id]) rescue nil
ticket = Ticket.find(params[:tickets_manage_id]) rescue nil
ticket.status = "open"
ticket.reopened_count = ticket.reopened_count + 1
tq = TicketQuery.new
@ -154,7 +154,7 @@ class Admin::TicketsManageController < OrbitAdminController
def toggleurgent
mark_urgent = params[:mark_urgent]
if mark_urgent
ticket = Ticket.find(params[:ticket_id]) rescue nil
ticket = Ticket.find(params[:tickets_manage_id]) rescue nil
if !ticket.nil?
if mark_urgent == "true"
if can_mark_urgent?(ticket)