Callback question

First of all: callbacks are way cool. I’ve used them in a number of
places and found them to be vastly superior to copying an entire page
and modifying it. Unfortunately, this brings me to a problem: figuring
out where callbacks really are being looked for. Let me present an example.

I’ve created a local copy of Update.html which includes the following
snippet of code inserted just before the end of the form:
<& /Ticket/Elements/ShowHistory ,
Ticket => $TicketObj,
ShowTitle => 0,
ShowDisplayModes => 0,
ShowTitleBarCommands => 0,
&>

Obviously, my purpose here is to make the ticket history available to
the commentor. To be even more convenient, all I want to display are
comments. No priority updates, status changes, etc. So, I then created
$RTHOME/local/html/Callbacks/CMUQ/Ticket/Update.html/SkipTransaction.
My thought here is that the ShowHistory element has a callback
(SkipTransaction) which will allow me to skip all of the uninteresting
transactions. Sadly, it’s not finding this file (verified by simply
inserting syntax errors which had no effect).

Now, while it would be nice to know the correct place to do this in this
specific case, it would be nice if there was a developer mode switch
that I could enable that would make the Callback mechanism reveal each
place it is looking for a callback. Clearly this would have performance
implications, though the reality is that if you are running in developer
mode then your performance will already be quite poor.

Anyway, I’m running 3.6.1 on RHEL4U4. My complete configuration
information was attached to the message I sent 10 minutes ago about
attachment issues.

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf
Of Brian Gallew
Sent: Thursday, November 23, 2006 2:09 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Callback question

First of all: callbacks are way cool. I’ve used them in a number of
places and found them to be vastly superior to copying an entire page
and modifying it. Unfortunately, this brings me to a
problem: figuring
out where callbacks really are being looked for. Let me
present an example.

I’ve created a local copy of Update.html which includes the following
snippet of code inserted just before the end of the form:
<& /Ticket/Elements/ShowHistory ,
Ticket => $TicketObj,
ShowTitle => 0,
ShowDisplayModes => 0,
ShowTitleBarCommands => 0,
&>

Obviously, my purpose here is to make the ticket history available to
the commentor. To be even more convenient, all I want to
display are
comments. No priority updates, status changes, etc. So, I
then created
$RTHOME/local/html/Callbacks/CMUQ/Ticket/Update.html/SkipTrans
action.
My thought here is that the ShowHistory element has a callback
(SkipTransaction) which will allow me to skip all of the
uninteresting
transactions. Sadly, it’s not finding this file (verified
by simply
inserting syntax errors which had no effect).

Brian,

The path to the callback is related to the Mason component where the
callback is actually invoked, ie where you see something like

$m->comp( '/Elements/Callback',   etc

In your case the SkipTransaction callback is invoked from the
/Ticket/Elements/ShowHistory component, so this is how the callback path
should be formed.

Steve

Stephen Turner
Senior Programmer/Analyst - Client Support Services
MIT Information Services and Technology (IS&T)

Stephen Turner wrote:

The path to the callback is related to the Mason component where the
callback is actually invoked, ie where you see something like

$m->comp( '/Elements/Callback',   etc

In your case the SkipTransaction callback is invoked from the
/Ticket/Elements/ShowHistory component, so this is how the callback path
should be formed.

Drat. That means that the Callback needs to be more complicated since I
only want to do the filtering for Update.html. Thanks, Stephen!