Shouldn't that be TransactionBatch and not TransactionCreate? Cheers, Ken
On Tue, Aug 30, 2011 at 11:17:54AM -0400, Dave Pascoe wrote: > Forgot to mention - running 4.0.2. > > -Dave > > On Tue, Aug 30, 2011 at 10:53 AM, Dave Pascoe <davek...@gmail.com> wrote: > > > 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; > > > > > > > > > -------- > RT Training Sessions (http://bestpractical.com/services/training.html) > * Chicago, IL, USA ? September 26 & 27, 2011 > * San Francisco, CA, USA ? October 18 & 19, 2011 > * Washington DC, USA ? October 31 & November 1, 2011 > * Melbourne VIC, Australia ? November 28 & 29, 2011 > * Barcelona, Spain ? November 28 & 29, 2011 -------- RT Training Sessions (http://bestpractical.com/services/training.html) * Chicago, IL, USA September 26 & 27, 2011 * San Francisco, CA, USA October 18 & 19, 2011 * Washington DC, USA October 31 & November 1, 2011 * Melbourne VIC, Australia November 28 & 29, 2011 * Barcelona, Spain November 28 & 29, 2011