[rt-devel] Proposed patch: __DefaultQueue__ in Tickets_SQL
Michele Bergonzoni
bergonz at labs.it
Thu Dec 13 12:41:37 EST 2012
I am fond of __DefaultUser___ in Tickets SQL, and I would appreciate a
similar __DefaultQueue__, to view tickets in the queue which is the
default in the logged user's preferences, or the system default.
This is the patch, works for me, relative to 4.0.8:
*** lib/RT/Tickets_SQL.pm.orig 2012-12-13 18:40:29.445181772 +0100
--- lib/RT/Tickets_SQL.pm 2012-12-13 18:41:02.069182241 +0100
***************
*** 202,207 ****
--- 202,214 ----
# replace __CurrentUser__ with id
$value = $self->CurrentUser->id if $value eq '__CurrentUser__';
+ # replace __DefaultQueue__ with its id
+ if ($value eq '__DefaultQueue__'){
+ my $queue = RT::Queue->new($self->CurrentUser );
+ $queue->Load($RT::Config->Get("DefaultQueue",
$self->CurrentUser));
+ $value = $queue->id;
+ }
+
unless( $dispatch{ $class } ) {
die "No dispatch method for class '$class'"
--
Ing. Michele Bergonzoni - Laboratori Guglielmo Marconi S.p.a.
Phone:+39-051-6781926 e-mail: bergonz at labs.it
alt.advanced.networks.design.configure.operate
More information about the rt-devel
mailing list