[rt-users] [PATCH REQ for 4.2.2] callback for Modify.html

Arkadiusz Miśkiewicz arekm at maven.pl
Wed Nov 27 02:32:46 EST 2013


On Tuesday 26 of November 2013, Arkadiusz Miśkiewicz wrote:
> On Tuesday 26 of November 2013, Kevin Falcone wrote:
> > On Tue, Nov 26, 2013 at 01:58:47PM +0100, Arkadiusz Miśkiewicz wrote:
> > > Was there any reason for not adding BeforeModify callback in
> > > Modify.html? It's logical to have the same sets of callbacks for
> > > similar actions IMO.
> > > 
> > > This patch below works (hand made, line wrapped, so likely won't apply
> > > directly). Please add such modification to 4.2.2. Thanks.
> > 
> > Your patch adds a callback right before another callback which passes
> > more useful information and can be used to accomplish the same goals.
> > The existing callback is even visible in your patch.
> > 
> > What does your new callback do that the Default callback doesn't?
> 
> That's a good question + #rt irc conversation explained few things for me.
> It's not needed at all. "Default" will be enough.

One thing is missing in Default though. results array.

 # Now let callbacks have a chance at editing %ARGS
 $m->callback( TicketObj => $TicketObj, CustomFields => $CustomFields, ARGSRef 
=> \%ARGS, skip_update => \$skip_update );


While new BeforeModify callback allows us to change error messages for 
example.

+$m->callback( CallbackName => 'BeforeModify', ARGSRef => \%ARGS, skip_update 
=> \$skip_update,
+              results => \@results, TicketObj => $TicketObj );


Could Default callback call be changed to allow results array modifications? 
Or is there any other way to change results from Default callback?

-- 
Arkadiusz Miśkiewicz, arekm / maven.pl



More information about the rt-users mailing list