Tig

From Request Tracker Wiki
Revision as of 16:39, 6 April 2016 by Admin (talk | contribs) (2 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Sandbox for stuff that I need to put into the wiki properly

RT and the odd results count, if you have a user and they don't have permissions to see tickets that are included in a search you will get the odd situation where RT will say it found 50 tickets and then only show the user 10 or something daft.

The reason is performance but this may not help.

The following is taken from the mailing list here :

when returning count of tickets found;#52333 http://www.gossamer-threads.com/lists/rt/users/52333?search_string=Bug%20when%20returning%20count%20of%20tickets%20found;#52333

Now the fix is not supported or recommended as it nails the DB a bit but if you are a smaller site or have a smaller DB you can get away with this :)

What will happen is that RT will do a search for the ticket and then iterate through the tickets checking each against the ACL.

So copy Tickets_Overlay.pm to your local tree (in my case : /usr/local/share/request-tracker3.6/lib/RT/Tickets_Overlay.pm )

Then edit somewhere around line 2495 ish (RT 3.4 here) so that the sub count all section now looks like this :

# {{{ sub CountAll sub CountAll {

 my $self = shift;
$self->_ProcessRestrictions() if ( $self->{'RecalcTicketLimits'} == 1 );
my $i = 0;
while ($self->Next) {
$i++;
}
return $i;

}

  1. }}}

Seems to be working on my dev box, will punt it at production tomorrow.