[rt-users] Search Results ... Found vs. Shown

Koen Martens gmc at metro.cx
Tue Feb 6 12:15:25 EST 2007


Todd Chapman wrote:
> The issue is performance. When RT does a count of tickets
> in a search result it counts the rows matching the criteria.
> But RT rights are granted on a per ticket basis using
> various roles (Owner, Requestor, Cc, AdminCc). To get
> an accuract count RT would have to ask if the user is
> allowed to see every ticket in the result. On some RT
> systems that would be unacceptably slow.
> 
> To get a tru count you have to overrid RT::Tickets::Count to
> loop through the tickets and see if the users has ShowTicket
> right for each one.

There is a work-around, which is to limit your SQL statement to
those queues where the user has the OwnTicket permission. In most
cases, this should be adequate.

It was posted on this mailing list a while back, and i found it
looking around the archive for '10 newest unowned tickets'.

Gr,

Koen



More information about the rt-users mailing list