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

Kevin Falcone falcone at bestpractical.com
Tue Feb 25 11:26:08 EST 2014


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140225/fe715114/attachment.sig>


More information about the rt-users mailing list