[rt-users] Custom onCreate scrip

Todd Chapman todd at chaka.net
Mon Nov 21 20:26:31 EST 2005


if ($self->TrasactionObj->Type eq 'Create' and
    $self->TicketObj->RequestorAddresses =~ /send/) {
     return 1;
}

On Tue, Nov 22, 2005 at 09:46:30AM +1030, Andrew Xenides wrote:
> Hi,
> 
> I want to do a custom condition for a scrip, which will basically be
> OnCreate and Requestor address matches "blah" then send the auto reply.
> 
> At the moment I have 
> 
> if ($self->TrasactionObj->Type =~ 'Create'){
>    if ($self->TicketObj->RequestorAddresses =~ /dontsend/){
>       return (undef);
>    }
>    if ($self->TicketObj->RequestorAddresses !~ /send/){
>       return (undef);
>    }
> }else{
>    return (undef)
> }
> return(1);
> 
> but that seems to be sending the auto reply on every transaction, not just
> when the ticket is created.
> 
> Im guessing im using the wrongs TransactionObj-> Type
> 
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Be sure to check out the RT Wiki at http://wiki.bestpractical.com
> 
> Download a free sample chapter of RT Essentials from O'Reilly Media at http://rtbook.bestpractical.com
> 
> WE'RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
> San Francisco - Find out more at http://bestpractical.com/services/training.html



More information about the rt-users mailing list