[rt-users] 10 newest unowned tickets only seen by those who has theright toOwnticket

Hoogstraten, Ton Ton.Hoogstraten at ingram.nl
Mon Jan 28 06:07:12 EST 2008


The following is working for me on RT 3.6.5. I found it on the
CustomizingWithCallbacks wiki page under the 'spam' link. You need to
create a file named 'ModifySearch'. See info below.



Using the Callback system:

/<local rt

if ($Name && $Name eq 'Unowned Tickets') {
  my $Queues = RT::Queues->new($session{'CurrentUser'});
  my @Queues;
  while (my $queue = $Queues->Next) { # added '|trash' below  Stucki
    next if $queue->Name =~ /^(info|rt.test|trash)$/;
    push (@Queues, $queue->Id) if
  my $QueryAdd = join (" OR ", map {"Queue = '$_'"} @Queues);
  $Search->{'Query'} = "(".$Search->{'Query'}.") AND (".$QueryAdd.")";
$Search => undef
$Name => undef

-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Shen,
Sent: Monday, January 28, 2008 6:47 AM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] 10 newest unowned tickets only seen by those who has
theright toOwnticket

Can someone please enlighten me on how to show the "10 newest unowned
tickets" to only those users who can own the tickets? Currently the "10
newest unowned tickets" shows all the tickets to those who have rights
to view, but these tickets are not necessarily those they can own. I
made the change in RT 3.2 only allowing users to view the tickets they
can own under "10 newest unowned tickets" and it worked beautifully. It
seems in RT3.6 this functionality is driven by the encrypted queries in
the Attributes table. Any help is appreciated!



Community help: http://wiki.bestpractical.com Commercial support:
sales at bestpractical.com

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

More information about the rt-users mailing list