[rt-users] Triggering scrips on add/delete Ccs

Gene LeDuc gleduc at mail.sdsu.edu
Thu Oct 18 18:09:43 EDT 2007


I'd check that there were no typos or extraneous characters in the 
condition code.  What you found and is working for you is essentially the 
same thing that I posted, minus the intermediate assignments to 
$transactionType and $watcherType.  The error message about the 
unrecognized \xE2 character seems to indicate that there was something odd 
in what it was trying to evaluate, maybe in the first line of scrip 39.

At 02:37 PM 10/18/2007, Tim Wilson wrote:
> >>> On Thu, Oct 18, 2007 at  4:25 PM, in message
><6.2.1.2.2.20071018142052.0267ed40 at mail.sdsu.edu>, Gene  LeDuc
><gleduc at mail.sdsu.edu> wrote:
> > Try
> >    return $self- >TransactionObj- >Type eq "AddWatcher" &&
> > $self- >TransactionObj- >Field eq "Cc";
>
>I thought that would work, but I got this error in the log:
>
>Oct 18 16:31:28 support RT: Scrip 39 IsApplicable failed: Unrecognized 
>character \xE2 at (eval 678) line 1.  Stack:   [(eval 
>678):1]   [/usr/local/rt3/lib/RT/ScripCondition_Overlay.pm:219] 
>[/usr/local/rt3/lib/RT/Scrip_Overlay.pm:437] 
>[/usr/local/rt3/lib/RT/Scrips_Overlay.pm:230] 
>[/usr/local/rt3/lib/RT/Transaction_Overlay.pm:171] 
>[/usr/local/rt3/lib/RT/Record.pm:1444] 
>[/usr/local/rt3/lib/RT/Ticket_Overlay.pm:1447] 
>[/usr/local/rt3/lib/RT/Ticket_Overlay.pm:1387] 
>[/usr/local/rt3/lib/RT/Interface/Web.pm:1432] 
>[/usr/local/rt3/share/html/Ticket/ModifyPeople.html:73] 
>[/usr/local/rt3/share/html/autohandler:292] 
>(/usr/local/rt3/lib/RT/Condition/UserDefined.pm:67)
>
>I did manage to find something that seems to work though. It was posted on 
>the list back in January, 2007.
>
>http://www.gossamer-threads.com/lists/rt/users/62335#62335
>
>I tweaked it to look for Cc instead of AdminCc and got:
>
>my $transactionType = $self->TransactionObj->Type;
>my $watcherType = $self->TransactionObj->Field;
>if (($transactionType eq 'AddWatcher') and ($watcherType eq 'Cc')) {
>return 1;
>}
>return undef;
>
>That definitely does the trick. Now I just need to figure out how to send 
>email to the newly minted Cc and not the whole group of Ccs. Thanks for 
>the help Gene and Forrest.
>
>-Tim
>
>
>--
>Tim Wilson, Director of Technology
>Buffalo-Hanover-Montrose Schools
>214 1st Ave NE   Buffalo, MN  55313
>ph: 763.682.8740  fax: 763.682.8743  http://www.buffalo.k12.mn.us


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 




More information about the rt-users mailing list