Bug when returning count of tickets found with querybuilder

My temporary solution was this (there has to be something better):

in lib/RT/Tickets_Overlay.pm, modify sub CountAll, and replace:

$self->_ProcessRestrictions() if ( $self->{'RecalcTicketLimits'} ==

1 );
return ( $self->SUPER::CountAll() );


my $i = 0;
while ($self->Next) {
return $i;

Next() does the right thing checking for privs and whatnot (same thing
that share/html/Elements/TicketList does to actually spit out the rows
to screen). Since the work is already done in TicketList (I took out
the call to CountAll there since it was redundant now), it’s a shame we
need to still call CountAll in Results.html, repeating the work.
Obviously can’t pass it backward from TicketList to Results.html, and
still need to iterate through the ticket $Collection to get the records
to print in TicketList. If anyone has a better idea, I’d be glad to
hear it :slight_smile: