JP, Todd, rt-users--
Yes, this works for us as well.
Perhaps this is an unintended side effect (or perhaps it's by design), but
the only problem I've found with this approach is that Custom Field
changes don't get mentioned at the top. I get "Message recorded" or
"Status changed to xxx", but I don't see the CF changes even though they
are made.
For the time being, I can deal with not getting confirmation of CF changes
as long as they are actually made, and with the Callback change made
below (combined with the move of the Callback) they do. And for that, I
thank you both.
-jd
On Wed, 26 Jul 2006, Koopmann, Jan-Peter wrote:
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
_______________________________________________
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