[rt-users] Mojo for Callback placement?

Barry L. Kline blkline at attglobal.net
Wed Oct 11 09:52:28 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I use RTCRON to escalate the priority of tickets.  A nasty byproduct of
this package is a long list of transactions in a given ticket's history.
 I want to eliminate "Set" "Priority" transactions from a ticket's
history when displaying the ticket.

I found the file where the history is created:

/opt/rt3/share/html/Ticket/Elements/ShowHistory

and within that file found the appropriate area with a callback:

while ( my $Transaction = $Transactions->Next ) {
    my $skip = 0;
    $m->comp( '/Elements/Callback',
              _CallbackName => 'SkipTransaction',
              Transaction   => $Transaction,
              skip          => \$skip,
              %ARGS );
    next if $skip;
    $i++;


So what I want is to create a callback that returns a "0" if the
transaction is to be displayed, or a "1" if it is to be skipped. (I'm
essentially wanting to rid myself of "Set" "Priority" transactions from
the output.

Now here is the part I'm finding difficult to grok... given the path
shown above, where do I create the code for the callback?  I assume that
the end of the path would be:

[something here]../Ticket/Elements/ShowHistory/SkipTransaction

but I'm unclear what the first part of that path is.

While the "RT Essentials" book has been an extraordinary resource for
working with RT, it doesn't seem to cover Callbacks at all.  The wiki
offers some suggestions but I'm still unclear.  I've tried a couple of
different locations but I'm shooting in the dark, without success.

To sum this all up, what would the fully qualified name of the file
containing the callback code be?

Thanks very much in advance for your help.

Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFFLPccCFu3bIiwtTARAqAYAKCODbBBoy80E/6VwVQLYB19efzqKACbBe0v
7kWDkj3/zVh77+c4/cuKtC0=
=TyYG
-----END PGP SIGNATURE-----



More information about the rt-users mailing list