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

Juan Ramón Alfageme Mata JRamon.Alfageme at alhambra-eidos.com
Wed Mar 30 02:57:45 EST 2005

I tried some more combinations without success.

	[Wed Mar 30 07:03:17 2005] [error]: Scrip 69 Commit failed: Can't call method "BaseObj" on an undefined value at (eval 817) line 4.

	  [(eval 817):4]
	[Wed Mar 30 07:03:17 2005] [info]: Ticket 691 created in queue 'Incidents' by user (/opt/rt3/lib/RT/Ticket_Overlay.pm:730)

Looking at commit code, problem must be in the second line, I am unable to get the reference ticket, in the log problem is always the same there is no reference ticket:

	my $CFName = 'CFName';

	my $Reference = $self->TicketObj->ReferredToBy->Next; --> Problem must be here.
	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;

Thanks for your help.
Juan Ramón Alfageme Mata
+34 91 787 23 00 alhambra-eidos.com

More information about the Rt-devel mailing list