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). If you want to actively block the user, look at RT-Extension-MandatoryOnTransition. It uses the BeforeUpdate callback 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. -kevin
pgpDyT5KxVs43.pgp
Description: PGP signature
-- RT Training London, March 19-20 and Dallas May 20-21 http://bestpractical.com/training
