Bug when returning count of tickets found with query builder

Say there are two queues, A and B. Say I have SeeQueue/ShowTicket/etc.
rights on queue A, but no rights at all on queue B. Say there are 2
tickets in each queue that have the subject “testing”.

If I do a query for the subject “testing”, then click “Search”, I will
get two result rows for queue A, and none for queue B, as would be
expected. But at the top of the page, it tells me “Found 4 tickets”.
If I was running as the superuser, I would see that there are indeed 4
tickets, and get all four result rows.

This appears to be a problem both in the 3.4.x and the 3.5.x code.

Eric Schultz
United Online, Inc.
818.287.3465

Call on God, but row away from the rocks.

  • Indian proverb

Say there are two queues, A and B. Say I have SeeQueue/ShowTicket/etc.
rights on queue A, but no rights at all on queue B. Say there are 2
tickets in each queue that have the subject “testing”.

If I do a query for the subject “testing”, then click “Search”, I will
get two result rows for queue A, and none for queue B, as would be
expected. But at the top of the page, it tells me “Found 4 tickets”.
If I was running as the superuser, I would see that there are indeed 4
tickets, and get all four result rows.

This appears to be a problem both in the 3.4.x and the 3.5.x code.

So. It’s a deliberate decision, for performance reasons. In order to
correctly show a count of only the ACLed tickets, RT would need to load
up all the tickets and walk through them one by one performing an ACL
check. Which is just too slow when you’re getting back a count result of
possibly hundreds or thousands of tickets.

Jesse