[rt-users] Callback Ticket/ShowHistory/SkipTransaction gives 'return 1; '

Barry L. Kline blkline at attglobal.net
Thu Oct 12 10:52:01 EDT 2006


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

Thanks to all who have assisted me in getting started with callbacks.
While I understand the principle by which the mechanism works, I'm not
getting what I expect, at all.  I'm running this on RT 3.6.1.

My callback code is called from Ticket/ShowHistory:

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

The callback code has been placed in the file
'/opt/rt3/local/html/Callbacks/MyCallbacks/Ticket/Elements/ShowHistory/SkipTransaction'
and the web server restarted. To ensure I'm on the right track, I copied
SkipTransaction from RTIR and altered it so that presumably, I should be
skipping all history transactions:

<%INIT>
# Set $skip to 1 if transaction matches criteria
# $skip is passed by reference

return $$skip = 1;

</%INIT>
<%ARGS>
$skip => undef
$Transaction => undef
</%ARGS>


When I look at any ticket, I get

return 1;
..............First transaction on the ticket .................
return 1;
..............Next transaction on the ticket  .................

[etc]


What I would expect is that there would be no history transactions
displayed.  In fact, if I boil the code down to:

<%INIT>
</%INIT>

I still get that result.  It I copy the SkipTransaction code from RTIR
verbatim get that result.  I have been looking over all of the callback
code that I can find on the web and see nothing that gives me any clue.
 Obviously, the callback mechanism works well and the problem is my lack
of knowledge on this topic.  What am I missing here?

Thanks very much!

Barry

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

iD8DBQFFLlaQCFu3bIiwtTARAgr3AJ0Rb1zQcXo0wjChQ4rcIKI5t4QUUQCeMY+D
EsEixJuIR3yJrLdEIMS6j0I=
=MpF1
-----END PGP SIGNATURE-----



More information about the rt-users mailing list