[rt-users] Create a scrip in RT 4

Kevin Falcone falcone at bestpractical.com
Fri Mar 23 11:33:06 EDT 2012


On Fri, Mar 23, 2012 at 03:01:20PM +0000, Howell, Van wrote:
> Let me see if I understand how this custom action works.
> 
> Do I edit the file /opt/rt4/local/plugins/RT-Action-MoveQueue By Subjec/Lib/RT/Action/MoveQueueBySubject.pm

No, do not edit that file.

> Changing ...
> Set(@MoveQueueBySubjectConditions,
>         '^begin', 'Start',
>         'end$', 'Finale',
>     );

This is from the documentation, so changing it would never affect
anything anyway.

Also from the documentation:

   It is a list of regular expressions and queues.

So looking back up at the example you quote, if the subject starts
with begin, put this in the Start queue, if the subject ends with end,
put it in the Finale queue.

> To look for the string I want, like...
> 
> Set(@MoveQueueBySubjectConditions, gr /Paper Jam/i    );
> 
> I set the variable $queue to the queue I want it to go to?
> 
> My $queue = 'Printer/Copier/Scanner'
> 
> Or the queue number...
> 
> My $queue = 6

A few things.  The operator is qr// not gr//, but you don't use qr
here, you just use a string, like the docs show.  You put a simple
regular expression in there and then put the queue name next.  If it
makes it easier for you to read, you can even write:

Set( @MoveQueueBySubjectConditions, 'Paper Jam' => 'Printer/Copier/Scanner' );

If you need to be case insensitive, see the note in the docs about how
to do that.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120323/7038b8f9/attachment.sig>


More information about the rt-users mailing list