[rt-users] Re: Short URLs for Tickets and Queues

Smylers smylers at gbdirect.co.uk
Thu Apr 11 11:24:29 EDT 2002


On Tuesday I wrote:

> I've just configured this system to use short URLs for displaying
> particular tickets or queues, which is handy when typing them
> manually. <Snip>
>
> ... Search/Listing.html has to be modified to know what to do with a
> ShowQueue parameter and turn it into the usual kind of queue search
> ...  Add this code at the start of the <%INIT> block in that file:
>
>   if (my $QueueName = $ARGS{ShowQueue})
>   {
>     $QueueName =~ tr/-_/  /;
>     my $Queue = RT::Queue->new($session{CurrentUser});
>     if ($Queue->Load($QueueName))
>     {
>       %ARGS =
>       (
>         ValueOfQueue => $Queue->Id,
>         ValueOfStatus => 'open',
>         ValueOfStatus => 'new',

That of course is completely pointless.  I generated this hash by
pasting in a 'proper' URL then doing search and replace on ampersand and
equals characters.  Instead of overwriting a hash entry that's only just
been created, we actually want an array in there.  Replace the above two
lines with:

        ValueOfStatus => ['open', 'new'];

>         StatusOp => '=',
>         QueueOp => '=',
>         NewSearch => '1',
>       );
>     }
>   }

Many apologies for such stupidity.

Smylers





More information about the rt-users mailing list