Hi,<br><br>Can anyone help me out with this query?<br><br>Thanks,<br><br>Raj<br><br><b><i>dsa sadf <indian_cricket_videos@yahoo.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Hi everyone,<br><br>I am using RT 3.4.5, running on a CentOS box. I was trying to restrict some privileged users from seeing tickets on queues they weren't allowed to. I managed to do that but in the process caused the 'Top 10 Resolved tickets' and 'Top 10 Unowned tickets' lists to display inaccurate tickets. For example, the 'Top 10 Resolved tickets' list shows some unowned and new tickets and the 'Top 10 Unowned tickets' list shows some resolved tickets. <br><br>I had added the following code to my 'MyRequests' file in order to restrict queue access for that user:<br><br><span style="font-style: italic;">my $Queues = RT::Queues->new($session{'CurrentUser'});</span><br style="font-style: italic;"><span
style="font-style: italic;">$Queues->UnLimit();</span><br style="font-style: italic;"><span style="font-style: italic;">my $myQueues = "";</span><br style="font-style: italic;"><span style="font-style: italic;">while (my $queue = $Queues->Next) {</span><br style="font-style: italic;"><span style="font-style: italic;"> next unless ($queue->CurrentUserHasRight('ShowTicket'));</span><br style="font-style: italic;"><span style="font-style: italic;"> $myQueues .= " OR Queue = '" . $queue->Name . "'";</span><br style="font-style: italic;"><span style="font-style: italic;">}</span><br style="font-style: italic;"><span style="font-style: italic;">$myQueues =~ s/^ OR //g;</span><br style="font-style: italic;"><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">my $Query = "Owner = 'Nobody' AND $myQueues AND ( Status = 'new' OR Status = 'open')";
</span><br><br>and for the 'MyResolved' file, the same code except for the last line which reads:<br><br><span style="font-style: italic;">my $Query = "Owner = 'Nobody' AND $myQueues AND ( Status = 'resolved)"; <br><br><span style="font-style: italic;"><span style="font-style: italic;"><br></span></span></span>Could anyone help me identify what the problem could be?<br><br><br>Regards,<br><br>Raj<span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"><br></span></span></span><br> <div> __________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com _______________________________________________<br>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users<br><br>Community help: http://wiki.bestpractical.com<br>Commercial support: sales@bestpractical.com<br><br><br>Discover RT's hidden secrets with RT Essentials from O'Reilly
Media. <br>Buy a copy at http://rtbook.bestpractical.com</div></blockquote><br><p> __________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com