Settings > Tickets. * Opened on a client's page, it starts on that client. Script: * agent/js/ticket_quick.js. */ enforceUserPermission('module_support', 2); if (!quickTicketCan()) { echo json_encode(['error' => 'Quick ticket is switched off - New Ticket is on the Tickets page.']); exit; } $quick = quickTicketSettings(); $client_id = intval($_GET['client_id'] ?? 0); // From the top bar's timer started before there was a ticket - the new ticket's timer carries on from it $from_call = !empty($_GET['call']); if ($client_id && !hasClientAccess($client_id)) { $client_id = 0; } // From a call popping up (js/phone_pop.js) - its contact picked, and no timer: the call's talk time goes on it when it ends $contact_id = $client_id ? intval($_GET['contact_id'] ?? 0) : 0; $phone_pop_call = function_exists('phonePopKey') ? phonePopKey($_GET['phone_call'] ?? '') : ''; if ($phone_pop_call !== '') { $quick['timer'] = 'off'; $from_call = false; } $assignee = quickTicketAssignee(); $assignee_name = $assignee && $assignee !== intval($session_user_id) ? (string) getFieldById('users', $assignee, 'user_name') : ''; $status = isset(ticketPickableStatuses()[$quick['status']]) ? $quick['status'] : 0; ob_start(); ?>