mirror of
https://github.com/itflow-org/itflow
synced 2026-11-21 20:07:24 +00:00
Assign an unassigned ticket to the first agent who replies where the client can see it, as Assign to me would, with internal notes, bulk replies and already assigned tickets left alone, and a switch under Admin Settings Tickets Assigning to turn it off (db 4.0.9)
This commit is contained in:
@@ -74,6 +74,23 @@ function ticketChangePriority($ticket_id, $priority) {
|
||||
return [true, "Priority updated from <strong>$original_priority</strong> to <strong>$priority_sql</strong>"];
|
||||
}
|
||||
|
||||
/*
|
||||
* Whether a reply the client sees, on a ticket nobody is assigned to, assigns it to
|
||||
* the agent who sent it - Admin > Settings > Tickets, config_ticket_reply_assigns.
|
||||
* On until database 4.0.9 adds the switch.
|
||||
*/
|
||||
function ticketReplyAssigns() {
|
||||
global $mysqli;
|
||||
static $on = null;
|
||||
if ($on === null) {
|
||||
$on = true;
|
||||
if (version_compare(defined('CURRENT_DATABASE_VERSION') ? (string) CURRENT_DATABASE_VERSION : '0', '4.0.9', '>=')) {
|
||||
$on = intval(mysqli_fetch_row(mysqli_query($mysqli, "SELECT config_ticket_reply_assigns FROM settings WHERE company_id = 1"))[0] ?? 1) === 1;
|
||||
}
|
||||
}
|
||||
return $on;
|
||||
}
|
||||
|
||||
/*
|
||||
* Assign to an agent, or to no one with 0. A New ticket that gets an agent
|
||||
* becomes Open. Returns [ok, message].
|
||||
|
||||
Reference in New Issue
Block a user