Search Results ... Found vs. Shown

Scenario… User creates a search that is “Status = Resolved”… Result says
Found 14 Tickets, but only 1 is shown. Since the user only has access to
one queue, he only sees the 1 resolved ticket in that queue. I understand
it…

So my question is, what’s the easiest way to make the Found # jive w/ the #
of tickets shown for the search? Logically I have an idea what to do, just
not sure where to go poking around. Plus I’m a bit cautious now that the
system is in use.

Thanks all for the help.

Laugh, share and connect with Windows Live Messenger
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=hmtagline

This is something I complained/pondered about many times at the past I
think Jesse said something to the effect that its difficult to perform
the search and access check at the same time without hammering your sql
server (jesse put it much better than that), I think an idea is to pull
the tickets which will be displayed into a hash and do the count on that
hash , for this you’ll need to change the place where the ticket count
is displayed from Build.html into Result.html or something to that effect …
Roy

Mat W wrote:

Scenario… User creates a search that is “Status = Resolved”… Result
says Found 14 Tickets, but only 1 is shown. Since the user only has access
to one queue, he only sees the 1 resolved ticket in that queue. I
understand it…

So my question is, what’s the easiest way to make the Found # jive w/ the #
of tickets shown for the search? Logically I have an idea what to do, just
not sure where to go poking around. Plus I’m a bit cautious now that the
system is in use.

Thanks all for the help.

Mat,

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.

-Todd

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