[rt-users] EditCustomFieldsOnUpdate does not work anymore

Koopmann, Jan-Peter Jan-Peter.Koopmann at seceidos.de
Wed Jul 26 03:54:51 EDT 2006


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



More information about the rt-users mailing list