osTicket Tips – Keep tickets assigned when closing


-When closing a ticket already assigned to an id_staff you may need to update the ticket with no change id_staff
-When close a ticket unassigned update the ticket assigning it to the id_staff who closed the ticket

MAKE SURE YOUR BACK UP FIRST!!! No WARRANTY ( but worked for me)
includeclass.ticket.php under the “function close ()”

function close(){

if(‘$staff_id’ > 0) {

// $sql= ‘UPDATE ‘.TICKET_TABLE.’ SET status=’.db_input(‘closed’).’,staff_id=0,isoverdue =0,duedate=NULL,updated=NOW(),closed=NOW() ‘.
$sql= ‘UPDATE ‘.TICKET_TABLE.’ SET status=’.db_input(‘closed’).’,isoverdue=0,duedate= NULL,updated=NOW(),closed=NOW() ‘.
‘ WHERE ticket_id=’.db_input($this->getId());
} else {
global $thisuser;
$sql= ‘UPDATE ‘.TICKET_TABLE.’ SET status=’.db_input(‘closed’).’,staff_id=’.db_input( $thisuser->getId()).’,isoverdue=0,duedate=NULL,updated=NOW(), closed=NOW() ‘.
‘ WHERE ticket_id=’.db_input($this->getId());

return (db_query($sql) && db_affected_rows())?true:false;

One thought on “osTicket Tips – Keep tickets assigned when closing”

  1. You share interesting things here. I think that your blog can go viral easily, but you must give it initial boost and i know how to
    do it, just type in google – mundillo traffic increase


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.