Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Add team assigned tickets to the "My Tickets" tab

We had a need to show Team Tickets in the My Tickets tab. I made a small change that seems to fill this need.

Find this code in /include/staff/tickets.inc.php :

$results_type='Assigned Tickets';
$qwhere.=' AND ticket.staff_id='.db_input($staffId);
$showassigned=false; //My tickets...already assigned to the staff.


and replace it with this code:


$results_type='Assigned Tickets';
$qwhere.=' AND (ticket.staff_id='.db_input($staffId). ' or (ticket.team_id in (select team_id from '.TEAM_MEMBER_TABLE.' where staff_id ='.db_input($staffId).') and ticket.staff_id=0))';
$showassigned=true; //altered so that it shows the assigned user so that we can tell the difference between team assigned and staff assigned.



I'm currently using v1.7.0. Use with caution.

Comments

  • edited November 2014
    Include/class.ticket.php
    Line: 2283

    .'WHERE ticket.staff_id = ' . db_input($staff->getId()) . ' or (ticket.team_id in (select team_id from '.TEAM_MEMBER_TABLE.' where staff_id =' .db_input($staff->getId()). ')) '
  • Tried this but unfortunately it didn't work.

    I altered the /include/staff/tickets.inc.php and Include/class.ticket.php files. Now when I click on "My tickets" It shows no tickets anymore. Any suggestions what is wrong? I am using the following version:






    osTicket-Version v1.9.11 (c1b5a33)
    Server-Software Apache/2.4.6 (Linux/SUSE)
    MySQL-Version 5.6.26
    PHP-Version 5.4.20
  • Can someone walk me through how to add this as it's own Sub Menu instead of hijacking the "My Tickets" tab?  We would like to show both team tickets quickly and still show only "My" tickets.

    Thanks!
  • @tbeitz and @holodoctor1 you should probably post your own threads asking questions rather than replying to threads that are from 2013.
This discussion has been closed.