Hello,

after upgrade to 4.2.9 (from 4.2.2), we noticed that Simple Search by Ticket id doesn't work.
If I enter 783509 in Search box, Edit Search shows sql query:

( Subject LIKE 783502 ) AND ( Status = 'new' OR Status = 'open' OR Status = 'resolved' OR Status = 'stalled' OR Status = 'rejected' OR Status = 'deleted' )

/usr/local/lib/perl5/site_perl/RT/Search/Simple.pm has lines:

    # Assume that numbers were actually "default"s if we have other limits
    if ($limits->{id} and keys %{$limits} > 1) {
        my $values = delete $limits->{id};
        for my $value (@{$values}) {
            $value =~ /(\d+)/ or next;
            my ($key, @tsql) = $self->HandleDefault($1);
            push @{$limits->{$key}}, @tsql;
        }
    }

which rewrites 'Id =' to 'Subject LIKE'.

sub HandleDefault   {
    my $fts = RT->Config->Get('FullTextSearch');
    if ($fts->{Enable} and $fts->{Indexed}) {
        return default => "(Subject LIKE '$_[1]' OR Content LIKE '$_[1]')";
    } else {
        return default => "Subject LIKE '$_[1]'";
    }
}

Regards,
Vladimir

Reply via email to