On Mon, Aug 11, 2014 at 11:55:00AM -0400, Michael Mol wrote: > Oh, that's good to know! I searched for at least an hour trying to > find that precise piece of information.
It is all over the mailing list archives, answered at last monthly these days. It should also be in the wiki. > ### Begin snippet for custom action preparation code > # Find the message from transactionobj->content > # Set the subject to the message by using ticketobj->SetSubject > > my $body = $self->TransactionObj->Content; > my @lines = split(m/\n/, $body); > my $trapID = $lines[0]; > my $message = $lines[2]; > > $self->TicketObj->SetSubject("$trapID -- $message"); > ### End snippet for custom action preparation code > > ### Begin snippet for custom action cleanup code > # No cleanup necessary; all the work was done in the prep stage. > > return 1; > ### End snippet for custom action cleanup code This is dangerous. RT executes the Prepare during scrip prep without doing the Commit. You should never make changes in the Prepare. > > I've seen your rewritten template, but a Notify scrip running in the > > transaction batch stage which has merely > > > > Subject: { $Ticket->Subject } > > > > should be more than sufficient, assuming it runs after your Subject > > modification scrip, preferably in a TransactionBatch scrip on the same > > Condition. > > Interesting. Where does the subject come from, if not > $Ticket->Subject? (I guess I could just look at the source code for > that.) Have you tried my suggestion yet? The answer is, at best, complicated. -kevin
pgpTi7hN6VTzS.pgp
Description: PGP signature
-- RT Training - Boston, September 9-10 http://bestpractical.com/training