On Tuesday, July 25, 2006 9:12 PM Todd Chapman wrote:
> I updated the
> rt/local/html/Callbacks/CustomFields/Ticket/Display.html/BeforeDisplay
> on the wiki.
I am not sure this will work. ProcessObjectCustomFieldUpdates seems to return
an array with an empty element even if it did not change anything. The
following if therefore always redirects to Display.html causing a loop. This is
very reproducable here with Perl 5.8.7 on FreeBSD. What did help was this:
<%init>
my $ARGSRef = $ARGS{'ARGSRef'};
if ($$ARGSRef{'id'} ne 'new'){
my $Ticket = LoadTicket($$ARGSRef{'id'});
my @cf_results = ProcessObjectCustomFieldUpdates(ARGSRef => $ARGSRef);
delete $cf_results[0] if ((scalar(@cf_results) == 1) && ($cf_results[0]
eq ''));
push @{$ARGS{Actions}}, @cf_results;
}
</%init>
With this change everything works like a charm here (of course after putting
the Callback in front of the if in Display.html which should be noted in the
wiki as well btw. What is
<%args>
$Actions => []
</%args>
doing exactly? Things work without it as well. Moreover: Will someone
talk/write to Jesse about the change in Display.html? This should be patched
into rt.
Kind regards,
JP
_______________________________________________
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
We're hiring! Come hack Perl for Best Practical:
http://bestpractical.com/about/jobs.html