[Rt-devel] Re: Transfer custom field value in ticket

Lucas F. Rosada lucas at dextra.com.br
Mon Mar 21 13:29:50 EST 2005


Juan, it would be good if you put some debug code inside your scrip 

code, so you will be able to see if (and what) function returned an 
error message. I reviewed the code and I haven't found any error, but if 
anyone see please help :-)

The debugging lines are inserted into this code. Take a look:

my $CFName = 'CustomField1';

my $Reference = $self->TicketObj->ReferredToBy->Next;
my $SourceTicket = $Reference->BaseObj;

$RT::Logger->debug ("source ticket subject: " . $SourceTicket->Subject);

my $CF1Values = $SourceTicket->CustomFieldValues($CFName);

$RT::Logger->debug ("Values for custom field $CFName: " . $CF1Values);

while (my $CurrValue = $CF1Values->Next) {
my( $st, $msg ) = $self->TicketObj->AddCustomFieldValue (Field => 
$CFName, Value => $CurrValue->Content);

$RT::Logger->debug ("Adding a value to custom field: $st - $msg")
}

return 1;

Regards,

-- 
Lucas F. Rosada
lucas at dextra.com.br

Dextra Sistemas
+55 (19) 3256 6722
http://www.dextra.com.br




-- 
Lucas F. Rosada
lucas at dextra.com.br

Dextra Sistemas
+55 (19) 3256 6722
http://www.dextra.com.br



More information about the Rt-devel mailing list