How to configure osTicket to let Agent see all his or team tickets (including closed and resolved) and not see tickets assigned to the other staff members or teams?I found only one option on Agent's account page - limited access. When it's checked - Agent can see only tickets assigned to him, but he can't see his already closed tickets. When it's unchecked - Agent can see all tickets of all Staff, including closed and resolved tickets.Thanks for your help.

Q: How

to configure osTicket to let Agent see all his or team tickets

(including closed and resolved) and not see tickets assigned to the

other staff members or teams?A: You can't.Once a ticket is close Teams no longer have access to them.Ticket access is dependent on Department(s).

Thanks for your reply, but unfortunately it doesn't help me to resolve the issue.You wrote: Ticket access is dependent on Department(s).I'm not sure. I moved one Agent to other Department and he still can see all tickets from all Departments.I still don't understand why Agent has possibility to see all tickets of all Staff, including closed and resolved tickets, but it's not possible to reduce the view to his/team tickets only (of course including "closed tickets" view).My staff need to see closed tickets, but only their own and teams.In my opinion good solution is to give possibility to display closed tickets. It could be an option on agent, team or department configuration page.Is any chance for that? :)

Currently the only workaround is to create separate internal department(s) to whom all agents with that "limited access" have full access, so that the can see assigned and also closed/resolved tickets.

I still do not see the logic in not being able to see the tickets your department has closed.  We run multiple departments and we do not want the desktop, networking, and telco groups to see each others tickets.  Our departments work very hard and spend a HUGE amount of time documenting resolutions in each ticket.  But this is a waste of time as they can not go back and review resolutions to past issues necessitating them to re-invent the wheel each time instead of being efficient.  As a manager who reviews SLA's and time spent per ticket, I can't talk to individuals to see why it took x amount of time when I know the resolution to the issue was already documented when they can't see it.  This is very counter productive.

3 months later

Is there still no solution? Need this feature to..

a month later

Hello altogether,I changed the code in /include/staff/tickets.inc.php - in OST Version 1.9.9arrount line 80 ( not realy shure as my tickets.inc.php is very customized ) find this code:        .' AND status.state="open") ';and change it to :       .' AND (status.state="open" OR status.state="closed")) ';Now my agent can see (ONLY) his own closed Tickets.I'm still looking how to show the number of closed tickets.Will update this post as soon as I find a solution.cheers Claus

HI Claus,Great solution for seeing the tickets, but clicking on one of them gives me a "Access denied. Contact admin if you believe this is in error". Any workaround to get into the closed tickets?Thank you!

Ah, I got the solution (I think) from fear-n-ice here:Only using C_c_lohmar's code, and this one:Edit "class.ticket.php" in the "/.include/" folder:Around line 180, add/edit the following code://Staff has access to the closed ticketif ($staff->showAssignedOnly() && ($staff->getId() == $this->getStaffId()) )return true;That did it (hopefully!).  I'll post any errors for anyone else I come across.

Last update - this code appears to be throwing a fatal error in the PHP log... PHP Fatal error:  Call to a member function showAssignedOnly() on a non-object in F:\sites\osticket19\include\class.ticket.php on line 2255Any advice on what to change?

4 days later

Hi holodoctor1 ,Thank you for this feedback and your addition to this mod - I actually din't make a test opening a ticket with a restricted Agent.Regarding the fatal error - Have you also applied the suggested change around line 2252?if ($staff->showAssignedOnly())

$where = '(ticket.staff_id='.db_input($staff->getId()).' AND status.state="closed")'

I still looking for the file that needs to get edited, to show the amount of closed Tickets in the Table Header. If any one has helpful information?Claus

2 months later

+1 for this feature, I think for many users this would be extremely useful because closed tickets are sometimes required for reference and the workaround of creating a separate department is not really ideal.

10 months later

Subscribing. Maybe someone made this feature for v1.10-rc.3, because it is the only we miss in this app. Our stuff need to see tickets closed by them.

3 years later

For osTicket (v1.11.0-rc1) you can change the following file: include/class.staff.php
method: getTicketsVisibility()
line:

$visibility = Q::any(new Q(array('status__state'=>'open', $assigned)));
to 
$visibility = Q::any(new Q(array('status__state__in'=>array('open', 'closed'), $assigned)));
Write a Reply...