[rt-users] Problems creating scrip to set custom field value on create.

Nathan Oyler noyler at khimetrics.com
Fri Jan 20 15:30:59 EST 2006


Trying to set a multi value select, custom field.

Desc: Assign Custom Field on Create
Condition: On Create
Action: User defined
Template: Global Blank
Stage: Transaction Create

Custom Action prep: 
return 1;

Custom action cleanup code:

my $queue = $self->TicketObj->QueueObj->Name;

if ($queue =~ /.*Client::(.*)/) {
my $cus = $1;
my $cf = RT::CustomField->new( $RT::SystemUser );

$cf->LoadByName( Name => 'Customer' );

$self->TicketObj->AddCustomFieldValue( Field => $cf, value => $cus );

$RT::Logger->info("Custom field $cus added to this ticket.");

return 1;


----------------

Nothing in the Errorlogs. RT:Logger->info gives me what I would expect.
(getting the correct match value)

The Customfield gets set as a nothing.

Not (no value) but literally nothing.

Any assistance? Thanks.



More information about the rt-users mailing list