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

Schincke, Keith D. (JSC-IT)[MEI] Keith.D.Schincke at nasa.gov
Thu Oct 18 18:04:55 EDT 2007


 
Did you copy in the space in the "- >"? There should be no white space
there in your Perl code. It should look like "->".

Just an attempt at an easy answer.

Keith


-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Tim
Wilson
Sent: Thursday, October 18, 2007 4:37 PM
To: Gene LeDuc
Cc: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] Triggering scrips on add/delete Ccs

>>> 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




_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales at bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com



More information about the rt-users mailing list