bug-fix-patch-7
# while changing owner of the ticket cheking if the owner already owns the ticket or not # fixed showing inactive agents problem in help topic edit and create pages
This commit is contained in:
@@ -85,7 +85,7 @@ class HelptopicController extends Controller
|
||||
$departments = $department->get();
|
||||
$topics = $topic->get();
|
||||
$forms = $form->get();
|
||||
$agents = $agent->where('role', '=', 'agent')->get();
|
||||
$agents = $agent->where('role', '!=', 'user')->where('active', '=', 1)->orderBy('first_name')->get();
|
||||
$slas = $sla->get();
|
||||
$priority = Ticket_Priority::where('status', '=', 1)->get();
|
||||
|
||||
@@ -143,7 +143,7 @@ class HelptopicController extends Controller
|
||||
public function edit($id, Ticket_Priority $priority, Department $department, Help_topic $topic, Forms $form, Sla_plan $sla)
|
||||
{
|
||||
try {
|
||||
$agents = User::where('role', '=', 'agent')->get();
|
||||
$agents = User::where('role', '!=', 'user')->where('active', '=', 1)->orderBy('first_name')->get();
|
||||
$departments = $department->get();
|
||||
$topics = $topic->whereId($id)->first();
|
||||
$forms = $form->get();
|
||||
|
@@ -2218,6 +2218,9 @@ class TicketController extends Controller
|
||||
if ($count === 1) {
|
||||
$user_id = $user->id;
|
||||
$ticket = Tickets::where('id', '=', $id)->first();
|
||||
if($user_id === $ticket->user_id) {
|
||||
return 400;
|
||||
}
|
||||
$ticket_number = $ticket->ticket_number;
|
||||
$ticket->user_id = $user_id;
|
||||
$ticket->save();
|
||||
|
Reference in New Issue
Block a user