[rt-users] RT 3.4.2 - Error displaying ticket after create

Mike B mberning at gmail.com
Fri Aug 19 09:32:13 EDT 2005


I made the changes suggested in the RT wiki to add custom fields to
the resolve ticket page using Callbacks. The resolve ticket page works
fine but the create new ticket function dies with the following error:

error: 	Can't call method "Id" on an undefined value at
/opt/rt3/lib/RT/Interface/Web.pm line 1118.
	
context: 	
... 		
1112: 		
1113: 	# Build up a list of objects that we want to work with	
1114: 	my %custom_fields_to_mod;	
1115: 	foreach my $arg ( keys %$ARGSRef ) {	
1116: 	if ( $arg =~ /^Object-([\w:]+)-(\d*)-CustomField-(\d+)-/ ) {	
1117: 	# For each of those objects, find out what custom fields we
want to work with.
1118: 	$custom_fields_to_mod{$1}{$2 || $args{'Object'}->Id}{$3} = 1;	
1119: 	}	
1120: 	}	
... 		
code stack: 	/opt/rt3/lib/RT/Interface/Web.pm:1116
/opt/rt3/lib/RT/Interface/Web.pm:1105
/opt/rt3/local/html/Callbacks/CustomFields/Ticket/Display.html/BeforeDisplay:3
/opt/rt3/share/html/Elements/Callback:70
/opt/rt3/share/html/Ticket/Display.html:149
/opt/rt3/share/html/Ticket/Create.html:289
/opt/rt3/share/html/autohandler:215

Here are the changes I made to RT as suggested in the wiki:

Place the following text in the file
rt/local/html/Callbacks/CustomFields/Ticket/Update.html/BeforeMessageBox:

<%init>
my $Ticket = LoadTicket($ARGS{'id'});
</%init>
<& /Ticket/Elements/EditCustomFields, TicketObj => $Ticket &>

Place the following text in the file
rt/local/html/Callbacks/CustomFields/Ticket/Display.html/BeforeDisplay:

<%init>
my $ARGSRef = $ARGS{'ARGSRef'};
my @cf_results = ProcessTicketCustomFieldUpdates(ARGSRef => $ARGSRef);
</%init>



Any assistance in fixing this problem is greatly appreciated.

Thanks,
Mike



More information about the rt-users mailing list