Request Tracker Wiki


870pages on
this wiki

Problem 1 Edit

In RT 3.6.x the Simple Search matches tickets regardless of status by default. Older users were used to being able to search for only tickets that were active (New, Open or Stalled). Those that are Resolved or Rejected are, well, completed and not searched for on a regular basis.

Solution 1: Callback Edit

1. Create your call back directory location

mkdir -p /<your-path-to-rt>/rt/local/html/Callbacks/stuff/Search/Simple.html

2. Put the following code into the file /<your-path-to-rt>/rt/local/html/Callbacks/stuff/Search/Simple.html/ModifyQuery

my $val = $$query;

if( $val !~ /new|open|resolved|stalled|rejected|deleted/i ) {
   $val = "new open stalled $val";
$$query = $val;

$query => undef

3. Enjoy. -- Dan O'Neill 2008/03/02

Solution 2: Edit

Create local/lib/RT/Search/ with the following

no warnings qw(redefine);
 # Change the simple search to exclude closed tickets.
 *orig_QueryToSQL = \&QueryToSQL;
 *QueryToSQL = sub {
     my $sql = orig_QueryToSQL(@_);
     if (!defined $sql) {
         return $sql;
     # Unless the search specifies a status, exclude finished tickets.
     if ($sql !~ /Status = '/) {
         $sql .= " AND Status != 'resolved' AND Status != 'rejected'";
     return $sql;

Tested with RT 3.6.1(Author) & 3.6.4(Ian Goodacre)

Results Edit

If a user searches for a string in Search dialog box in the header and doesn't include status keys in their search, the status' that will be searched are New, Open and Stalled.

Around Wikia's network

Random Wiki