[rt-users] Scrip to auto-resolve a ticket based on subject

David Hooton david.hooton at platformnetworks.net
Fri Jul 31 04:07:37 EDT 2009


Hi all,

We get backup reports sent to our RT every night and we need to have them stored in the helpdesk, however we would like to resolve all tickets immediately which arrive for jobs that complete successfully, so that we only see the reports which require action, but can still search on the resolved successful ones if we need to.

So far I've created a scrip in our Backup queue which looks like this:

Condition: user defined
Action: user defined
Template: -
Stage: TransactionCreate

In custom condition I have:

my $match = "Backup Report [Successful]";
my $t_subject = $self->TicketObj->Subject;
if ( $t_subject !~ /$match/i ) {
   return 0;
}
else {
   return 1;
}

In Custom action preparation code I have nothing.

In Custom action cleanup code I have:

$self->TicketObj->SetStatus( "resolved"); return 1;

I'm sure I'm missing something, my perl is REALLY not good so I hope you uys can help point out what I'm missing.  Thanks for your help!

Kind Regards,

David Hooton
Managing Director
Platform Networks
www.platformnetworks.net





More information about the rt-users mailing list