[rt-users] Custom Scrip and Send Notification

Tim Casada tim.l.casada at sherwin.com
Wed Feb 8 19:13:02 EST 2006


Hi I'm new to RT and looking to implement the following functionality.  
Any help would be appreciated!

When a user sets a custom field value to a particular value, I wish to 
add an AdminCC to the ticket and then send a notification to the AdminCC 
group.  I currently have the add the AdminCC part working with the code 
below, but I cannot figure out how then to instruct RT to then send a 
notification to the group.

Description: My Custom Scrip
Condition: User Defined
Action: User Defined

Custom condition: if (($self->TransactionObj->Type eq "CustomField") and
                             ($self->TransactionObj->NewValue eq 
"Enhancement")) {
                              return(1);
                            } else {
                              return(undef);
                            }

Custom action preparation code: return 1;

Custom action cleanup code: my $admincclist = $self->TicketObj->AdminCc;
                                            my $user = 
RT::User->new($RT::SystemUser);
                                            
$user->LoadByEmail('mynewadminCC at domain.com');
                                            
$admincclist->AddMember($user->Id);



More information about the rt-users mailing list