Callback for Search/Simple.html not working on freebsd

Hello.

It’s FreeBSD 6.2-R, apache-2.2.14, rt-3.8.8

I’m trying to make simple search broader so it will search all tickets
including resolved, and did as it says in
http://requesttracker.wikia.com/wiki/CustomizingWithCallbacks

apache configuration:

<VirtualHost *:80>
ServerName support.domain.ru

 DocumentRoot /usr/local/share/rt38/html
 AddDefaultCharset UTF-8

 PerlRequire "/usr/local/bin/webmux.pl"

 <Directory /usr/local/share/rt38/html>
     Options Indexes FollowSymlinks
 </Directory>
 <Location /NoAuth/images>
     SetHandler default
 </Location>
 <Location />
     SetHandler perl-script
     PerlResponseHandler RT::Mason
 </Location>

FreeBSD port installs RT files under /usr/local/share:

ls /usr/local/share/rt38

etc fonts html lib local plugins po

I created file with callback:

/usr/local/share/rt38/local/html/Callbacks/MyCallbacks/Search/Simple.html/ModifyQuery:

<%init>
$$query = $$query . " new open resolved stalled rejected deleted";
</%init>

<%args>
$query => undef
</%args>

But the magic did not work, search finds only new and open tickets. I’ve
tried to put $RT::Logger call in ModifyQuery (though i don’t know should
it work in callback files or not) to test does it even go into this
file, and nothing appears in logs.

I also tried to put whole path with callback file
local/html/Callbacks/MyCallbacks/Search/Simple.html/ModifyQuery to
/var/run/rt38 (where mason_data and session_data resides) with no outcome.

How can i debug this callback to find where the problem is? I’ve set RT
to send debug logs to file, and i see nothing suspicious there.

Help please.

best regards
alexander lunev

Not to discourage you, but it is really better to not default to
search resolved tickets. That number will grow without bound and
eventually kill your performance. Also, how will you NOT search
the resolved tickets? My two cents.

Cheers,
KenOn Tue, Dec 07, 2010 at 05:47:06PM +0300, alexander lunev wrote:

Hello.

It’s FreeBSD 6.2-R, apache-2.2.14, rt-3.8.8

I’m trying to make simple search broader so it will search all tickets
including resolved, and did as it says in
http://requesttracker.wikia.com/wiki/CustomizingWithCallbacks

apache configuration:

<VirtualHost *:80>
ServerName support.domain.ru

DocumentRoot /usr/local/share/rt38/html
AddDefaultCharset UTF-8

PerlRequire "/usr/local/bin/webmux.pl"

<Directory /usr/local/share/rt38/html>
    Options Indexes FollowSymlinks
</Directory>
<Location /NoAuth/images>
    SetHandler default
</Location>
<Location />
    SetHandler perl-script
    PerlResponseHandler RT::Mason
</Location>

FreeBSD port installs RT files under /usr/local/share:

ls /usr/local/share/rt38

etc fonts html lib local plugins po

I created file with callback:

/usr/local/share/rt38/local/html/Callbacks/MyCallbacks/Search/Simple.html/ModifyQuery:

<%init>
$$query = $$query . " new open resolved stalled rejected deleted";
</%init>

<%args>
$query => undef
</%args>

But the magic did not work, search finds only new and open tickets. I’ve
tried to put $RT::Logger call in ModifyQuery (though i don’t know should it
work in callback files or not) to test does it even go into this file, and
nothing appears in logs.

I also tried to put whole path with callback file
local/html/Callbacks/MyCallbacks/Search/Simple.html/ModifyQuery to
/var/run/rt38 (where mason_data and session_data resides) with no outcome.

How can i debug this callback to find where the problem is? I’ve set RT to
send debug logs to file, and i see nothing suspicious there.

Help please.


best regards
alexander lunev

07.12.2010 17:51, Kenneth Marshall пишет:

Not to discourage you, but it is really better to not default to
search resolved tickets. That number will grow without bound and
eventually kill your performance. Also, how will you NOT search
the resolved tickets? My two cents.

I need to search resolved tickets, and in simple search they’re not
searching. Besides, this is my first try to make callbacks work, and i’m
planning to further customize RT for my needs, and i want to understand
why it is not working at all?

Cheers,
Ken

Hello.

It’s FreeBSD 6.2-R, apache-2.2.14, rt-3.8.8

I’m trying to make simple search broader so it will search all tickets
including resolved, and did as it says in
http://requesttracker.wikia.com/wiki/CustomizingWithCallbacks

apache configuration:

<VirtualHost *:80>
ServerName support.domain.ru

 DocumentRoot /usr/local/share/rt38/html
 AddDefaultCharset UTF-8

 PerlRequire "/usr/local/bin/webmux.pl"

 <Directory /usr/local/share/rt38/html>
     Options Indexes FollowSymlinks
 </Directory>
 <Location /NoAuth/images>
     SetHandler default
 </Location>
 <Location />
     SetHandler perl-script
     PerlResponseHandler RT::Mason
 </Location>

FreeBSD port installs RT files under /usr/local/share:

ls /usr/local/share/rt38

etc fonts html lib local plugins po

I created file with callback:

/usr/local/share/rt38/local/html/Callbacks/MyCallbacks/Search/Simple.html/ModifyQuery:

<%init>
$$query = $$query . " new open resolved stalled rejected deleted";
</%init>

<%args>
$query => undef
</%args>

But the magic did not work, search finds only new and open tickets. I’ve
tried to put $RT::Logger call in ModifyQuery (though i don’t know should it
work in callback files or not) to test does it even go into this file, and
nothing appears in logs.

I also tried to put whole path with callback file
local/html/Callbacks/MyCallbacks/Search/Simple.html/ModifyQuery to
/var/run/rt38 (where mason_data and session_data resides) with no outcome.

How can i debug this callback to find where the problem is? I’ve set RT to
send debug logs to file, and i see nothing suspicious there.

Help please.


best regards
alexander lunev

С уважением
Александр Лунев
ОАО РТК

07.12.2010 17:51, Kenneth Marshall ???:

Not to discourage you, but it is really better to not default to
search resolved tickets. That number will grow without bound and
eventually kill your performance. Also, how will you NOT search
the resolved tickets? My two cents.

I need to search resolved tickets, and in simple search they’re not
searching. Besides, this is my first try to make callbacks work, and i’m
planning to further customize RT for my needs, and i want to understand why
it is not working at all?

All that you should need to do is include the word resolved in the
Simple Search window to search resolved tickets. For example:

turkey open resolved

would search all open or resolved tickets with the word turkey in
the subject.

Ken

08.12.2010 16:58, Kenneth Marshall пишет:

I need to search resolved tickets, and in simple search they’re not
searching. Besides, this is my first try to make callbacks work, and i’m
planning to further customize RT for my needs, and i want to understand why
it is not working at all?

All that you should need to do is include the word resolved in the
Simple Search window to search resolved tickets. For example:

turkey open resolved

would search all open or resolved tickets with the word turkey in
the subject.

Thank you for this valuable advice, although i already know how to
search all tickets by including words like resolved or deleted.

The question is WHY CALLBACK DOESN’T WORK?

best regards

08.12.2010 16:58, Kenneth Marshall ???:

I need to search resolved tickets, and in simple search they’re not
searching. Besides, this is my first try to make callbacks work, and i’m
planning to further customize RT for my needs, and i want to understand
why
it is not working at all?

All that you should need to do is include the word resolved in the
Simple Search window to search resolved tickets. For example:

turkey open resolved

would search all open or resolved tickets with the word turkey in
the subject.

Thank you for this valuable advice, although i already know how to search
all tickets by including words like resolved or deleted.

The question is WHY CALLBACK DOESN’T WORK?

You probably did this already, but did you clear the Mason cache?

Ken

FreeBSD port installs RT files under /usr/local/share:

ls /usr/local/share/rt38

etc fonts html lib local plugins po

I created file with callback:

/usr/local/share/rt38/local/html/Callbacks/MyCallbacks/Search/Simple.html/ModifyQuery:

You should really confirm from Configuration → Tools → System
Configuration that you have the correct MasonLocalComponentRoot

New enough RTs will also include a mason template search order listing

Also, you don’t seem to have answered the question posed earlier about
whether or not you cleared your mason cache after writing this
callback.

You also don’t have any logging in your callback which means you can’t
tell whether or not it worked without examining the results.

-kevin