
briandelshasta at gmail
Nov 9, 2009, 12:07 PM
Post #1 of 1
(732 views)
Permalink
|
Hello, I hoping someone can help me understand why a scrip I'm trying to create is not working correctly. Description: MergeBasedOnContent Condition: On Create Action: User Defined Template: Global template: Blank Stage: TransactionCreate Custom condition: <blank> Custom action preparation code: my $AttachObj = $self->TransactionObj->Attachments->First; my $content = $AttachObj->Content; if ( $content =~ s/^\Qmerge:\E\s*(\S+)\s*$//im ) { $self->TicketObj->MergeInto( $1 ); } Custom action cleanup code: <blank> The goal here is to search any new tickets for a string 'merge:' followed by a number, and then merge the new ticket into that number. This works fine for condition: On Correspond, but I am unable to get it to work on create. It seems like its not finding the attachment. Any ideas? Thanks
|