On Fri, Jul 31, 2009 at 06:07:37PM +1000, David Hooton wrote:
> Hi all,
>
> So far I've created a scrip in our Backup queue which looks like this:
>
> my $match = "Backup Report [Successful]";
First the square brackets have to be escaped. You want
"Backup Report \[Successful\]"
> my $t_subject = $self->TicketObj->Subject;
> if ( $t_subject !~ /$match/i ) {
> return 0;
> }
> else {
> return 1;
> }
Also, Perl return value for true is 1 and if you want the scrip to
execute for subject matching, you'll want to put return 1 inside the if
body.
> In Custom action preparation code I have nothing.
>
> In Custom action cleanup code I have:
>
> $self->TicketObj->SetStatus( "resolved"); return 1;
Also I would advise you to set the action to resolve ticket
instead of user defined, since I would expect you to have a resolve
ticket available by default. Hope this helps.
--
Regards, Terence.
http://www.deeproot.in
Ph: +91 (80) 4089 0000
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [email protected]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com