[rt-users] MyRequests apparent bug

Stephen Turner sturner at MIT.EDU
Fri Mar 4 10:05:30 EST 2005


At Friday 3/4/2005 12:12 AM, Rick Measham wrote:
>MyRequests, MyTickets and I imagine a whole pile of other places in 3.22
>seem to have a bug ...
>
>SO .. it looks like we're getting the top ten, then checking each for
>permissions rather than checking permissions on all tickets and then
>showing the top 10.
>
>Is this a known bug? Is there a patch? I don't understand enough of the
>inner-inner-inner workings of RT to track this one down!

Hello Rick,

I reported this issue for version 3.1.14 last July (rt bug #5832). I don't 
know the status of the bug report, rt3.fsck.com seems to be not responding. 
Your analysis in the second paragraph above is correct.

I did send in the following patch (for 3.1.14), but I'm not sure it's a 
good idea - it loops through all the tickets and checks permissions for 
each one until it finds 10 or reaches the end of the list - it seems like 
it would be slow. We ended up removing the ticket listings from the home 
page anyway, so I didn't worry too much about this issue. Anyway, here's 
the patch - you can at least play with something similar and see if  it works.

Steve

--- share/html/Elements/TicketList      Fri Mar  5 00:05:28 2004
+++ local/html/Elements/TicketList      Thu Jul  8 14:53:28 2004
@@ -36,6 +36,7 @@
   % while (my $record = $Collection->Next) {
   % $i++;
   <& .Row, Format => \@Format, i => $i, record => $record &>
+% last if $i >= $Rows;
   % }
   </TABLE>
   % if ($ShowNavigation) {
@@ -364,7 +365,6 @@


   $Collection->OrderBy(FIELD => $OrderBy, ORDER => $Order);
-$Collection->RowsPerPage($Rows);
   $Collection->GotoPage($Page-1); # SB uses page 0 as the first page
   my $TotalFound =  $Collection->CountAll();




Stephen Turner
Senior Programmer/Analyst - Client Support Services
MIT Information Services and Technology (IS&T)

sturner at mit.edu




More information about the rt-users mailing list