[rt-users] Trouble with scrip to set status based on email subject
Dave Pascoe
davekm3t at gmail.com
Tue Aug 30 10:53:05 EDT 2011
Trying to set up this Scrip to set Resolved status based on email subject.
It is auto-closing all tickets.
Any ideas? I have to be missing something basic. I already tested the
regex match separately. I also thought I had the logic reversed but tested
it both ways (!~ and =~).
TIA,
Dave
Description: Auto Close Google Checkout emails
Condition: On Create
Action: User Defined
Template: Global Template: Blank
Stage: TransactionCreate
Custom condition:
my $match = "Order [0-9][0-9]+ has been cancelled by Google";
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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110830/258cada5/attachment.htm>
More information about the rt-users
mailing list