[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
Tyler,
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.
Cheers,
Ton
Using the Callback system:
/<local rt
path>/html/Callbacks/MyCallbacks/Elements/ShowSearch/ModifySearch:
<%INIT>
if ($Name && $Name eq 'Unowned Tickets') {
my $Queues = RT::Queues->new($session{'CurrentUser'});
$Queues->UnLimit();
my @Queues;
while (my $queue = $Queues->Next) { # added '|trash' below Stucki
2005-09-12
next if $queue->Name =~ /^(info|rt.test|trash)$/;
push (@Queues, $queue->Id) if
$queue->CurrentUserHasRight('OwnTicket');
}
my $QueryAdd = join (" OR ", map {"Queue = '$_'"} @Queues);
$Search->{'Query'} = "(".$Search->{'Query'}.") AND (".$QueryAdd.")";
}
</%INIT>
<%ARGS>
$Search => undef
$Name => undef
</%ARGS>
-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Shen,
Tyler
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!
Tyler
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
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