Hi all,
I modified the code to keep assigned to staff the closed tickets in order to avoid unassignment when closing the ticket.
include/class.ticket.php;
Original:
Updated:
It works like a charm but my problem is that closed and assigned ticket still appearing in My Assigned Tickets counter and i´m going crazy trying to find the f***ing query that counts these tickets.
I just want to add a single "...WHERE status="open" " :(
I modified the code to keep assigned to staff the closed tickets in order to avoid unassignment when closing the ticket.
include/class.ticket.php;
Original:
//Close the ticket
function close(){
$sql= 'UPDATE '.TICKET_TABLE.' SET status='.db_input('closed').',staff_id=0,isoverdue =0,updated=NOW(),closed=NOW() '.
' WHERE ticket_id='.db_input($this->getId());
return (db_query($sql) && db_affected_rows())?true:false;
}
Updated:
//Close the ticket
function close(){
global $thisuser;
$sql= 'UPDATE '.TICKET_TABLE.' SET status='.db_input('closed').',staff_id='.db_input( $thisuser->getId()).
',isoverdue=0,updated=NOW(),closed=NOW() '.
' WHERE ticket_id='.db_input($this->getId());
return (db_query($sql) && db_affected_rows())?true:false;
}
It works like a charm but my problem is that closed and assigned ticket still appearing in My Assigned Tickets counter and i´m going crazy trying to find the f***ing query that counts these tickets.
I just want to add a single "...WHERE status="open" " :(