[rt-users] help with ModifyQuery callback

Izz Abdullah Izz.Abdullah at hibbett.com
Wed Oct 12 16:41:58 EDT 2011


And I have tried with just $query...I wrote the silly program though and received what I expected, an error for an undefined variable.  If I change the print line to
print $query;
I get also what I would expect, an echo to stdout of "search term"

I have been using the double $ because that is all I could find on the net...no one here has given me any other guidance on this issue.
http://requesttracker.wikia.com/wiki/SimpleSearchIncludeResolved
http://wiki-archive.bestpractical.com/edit/ModifyQuery/1768
and there are a few others
Another reason is the code I have used from what I saw here on skipping ticket history transactions for unprivileged users (SkipTransaction):
<%init>
    return if $session{'CurrentUser'}->Privileged;
    my($myskip)=1;
    if ($Transaction->Type =~ /^(Correspond|Create)$/) {
        $myskip=0;
    }

$$skip=$myskip;
</%init>

<%args>
$Transaction => undef
$skip
</%args>

Which works beautifully!  (Thanks to Lars on for the code)



-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Kevin Falcone
Sent: Wednesday, October 12, 2011 3:10 PM
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] help with ModifyQuery callback

On Wed, Oct 12, 2011 at 02:45:08PM -0500, Izz Abdullah wrote:
> $$query = "fulltext:$$query"; #I have also tried $$query = "fulltext:" . $$query;

I don't think this does what you think it does.

Try writing a trivial perl program.

use strict; use warnings;
my $query = "search term";
print $$query;

-kevin



More information about the rt-users mailing list