To all,

        I need some help with a scrip. I have the following coded:

#
#----------------------------------------------------------------------------
# Custom condition:
#----------------------------------------------------------------------------
#
# Check for ticket status changed to "open"
#
my $trans = $self->TransactionObj;

return ($trans->Type eq "Status" &&
        $trans->NewValue eq "open");

#----------------------------------------------------------------------------
# Custom action preparation code:
#----------------------------------------------------------------------------

# set new Work-Status value

my $ticket = $self->TicketObj;
my $cf_obj = RT::CustomField->new($RT::SystemUser);
my $cf_name = "Work-Status";
my $cf_value = "Estimating Effort";

$cf_obj->LoadByName( Name => $cf_name );
$RT::Logger->debug( "Loaded \$cf_obj->Name = ". $cf_obj->Name() ."\n" );
$cf_obj->AddValueForObject( Object=>$ticket, Content=>$cf_value, );

return 1;

#----------------------------------------------------------------------------
# Custom action cleanup code: None
#----------------------------------------------------------------------------

When I change the ticket status to "open", nothing happens. I do have a notification scrip that produces an E_mail notification based on the same user-defined condition and that works. But nothing else is getting done. Any ideas as to why? I have another scrip similar to this one (different Custom field modified and for only 1 particulat queue) and it doesn't work either. Thanks in advance.


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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Reply via email to