[rt-users] A little help with a 4.x callback?

Jeff Blaine jblaine at kickflop.net
Tue Feb 25 15:40:36 EST 2014

On 2/25/2014 11:26 AM, Kevin Falcone wrote:
> On Mon, Feb 24, 2014 at 06:10:59PM -0500, Jeff Blaine wrote:
>> I see in 4.2.x (perhaps in 4.0.x) that there is now a ProcessUpdates
>> callback available for use in Ticket/Modify.html
>> I'm reworking some old 3.8 code that would send a message to the end
>> user via (sigh) ... Abort() ... if a certain field had not been set
>> to a value and the user was trying to resolve the ticket.
>> The Ticket/Modify.html callback call reads as:
>>     $m->callback( CallbackName => 'ProcessUpdates', TicketObj =>
>> $TicketObj, ARGSRef => \%ARGS, Results => \@results );
>> How might I make use of this @results array in my callback?
> If you're trying to block the update, ProcessUpdates is too late (all
> it lets you do is make more changes and push messages back up to the
> user).

Yes, I finally got to that same understanding in the last few
hours working on this some more. I'm using 'Default' now.

> If you want to actively block the user, look at
> RT-Extension-MandatoryOnTransition.  It uses the BeforeUpdate callback

Oh, excellent. This will allow us to offload quite a bit of the
logic we already have in place and instead focus on the "real"
custom logic we need.

> in Ticket/Update.html to set skip_create and push onto @results.  You
> can clone that functionality to the Default callback in
> Ticket/Modify.html.

Thanks Kevin.

More information about the rt-users mailing list