Show the Amount at Closed Tickets Sub Tab of osTicket v1.6 RC5

This simple modification was created since there was a good request on osTicket Discussion Forum about how to show the amount of tickets at the Closed Tickets sub tab under the Tickets tab in staff panel of osTicket. This modification applied to osTicket v1.6 RC5.

Open your \scp\tickets.php file, and find this code:

442
     ',count(overdue.ticket_id) as overdue, count(assigned.ticket_id) as assigned '.

then replace with this following code:

442
443
     ',count(overdue.ticket_id) as overdue, count(assigned.ticket_id) as assigned '.
     ',count(closed.ticket_id) as closed '.

Find again this code:

448
     'LEFT JOIN '.TICKET_TABLE.' overdue ON overdue.ticket_id=ticket.ticket_id AND overdue.status=\'Open\' AND overdue.isoverdue=1 '.

then replace with this following code:

448
449
     'LEFT JOIN '.TICKET_TABLE.' overdue ON overdue.ticket_id=ticket.ticket_id AND overdue.status=\'Open\' AND overdue.isoverdue=1 '.
     'LEFT JOIN '.TICKET_TABLE.' closed ON closed.ticket_id=ticket.ticket_id AND closed.status=\'closed\' '.

Find again this code:

489
$nav->addSubMenu(array('desc'=>'Closed Tickets','title'=>'Closed Tickets', 'href'=>'tickets.php?status=closed', 'iconclass'=>'closedTickets'));

then replace with this following code:

489
$nav->addSubMenu(array('desc'=>'Closed Tickets ('.$stats['closed'].')','title'=>'Closed Tickets', 'href'=>'tickets.php?status=closed', 'iconclass'=>'closedTickets'));

Now you should see the amount of the closed tickets following the Closed Tickets sub tab under the Tickets tab in staff panel.

Share

655 viewsPrint This Post Print This Post

Comments

  1. Durga says:

    working very nice.

  2. @Durga

    Thanks. Have a nice code!

Speak Your Mind

*


*