[rt-users] Callback Ticket/ShowHistory/SkipTransaction gives'return 1; '
Stephen Turner
sturner at MIT.EDU
Thu Oct 12 11:22:51 EDT 2006
> -----Original Message-----
> 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++;
>
>
> <%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 .................
>
Barry,
Perhaps your mason cache needs to be cleaned out? The only way I can see
that you would get that result is if the SkipTransaction callback was this:
return 1;
<%ARGS>
$skip => undef
$Transaction => undef
</%ARGS>
Did you have something like that in an earlier iteration? Incidentally, you
don't need to return a value here, just set $$skip.
Good luck,
Steve
More information about the rt-users
mailing list