[rt-devel] Proposed patch: __DefaultQueue__ in Tickets_SQL

Ruslan Zakirov ruz at bestpractical.com
Thu Dec 13 12:56:14 EST 2012


Hi,

I like it. If you have cycles to create proper pull request or git
patch then it expedite inclusion. If you don't then create a ticket on
http://issues.bestpractical.com and we will get to it at some point.

On Thu, Dec 13, 2012 at 9:41 PM, Michele Bergonzoni <bergonz at labs.it> wrote:
> 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
> --------
> We're hiring! http://bestpractical.com/jobs



-- 
Best regards, Ruslan.


More information about the rt-devel mailing list