Scrip to auto-resolve a ticket based on subject

Terence,

It benefits the community if you reply/Cc to the list.

Apologies - I didn’t hit reply all.

I have it working now, that wiki article helped me find my errors. For others future reference here’s what I wound up with:

Description: Auto Close Successful Backups
Condition: On Create
Action: User Defined
Template: Global Template: Blank
Stage: TransactionCreate

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

Custom action preparation code:

return 1;

Custom action cleanup code:

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

This seems to be working really well now, thanks to Terence for his help.

Kind Regards,

David Hooton
Managing Director
Platform Networks