Commit aea995ff authored by Kevin Falcone's avatar Kevin Falcone
Browse files

Merge branch '3.0/simple-search-ticket-redirect' into 3.0.0-releng

parents 6e91c4ed 2a38e0f3
......@@ -61,6 +61,11 @@ unless ( exists $session{'my_rtir_portlets'} ) {
my $portlets = $session{'my_rtir_portlets'};
if ( defined $q && length $q ) {
if ($q =~ /^#?(\d+)$/) {
RT::Interface::Web::Redirect(RT->Config->Get('WebURL')."RTIR/Display.html?id=".$1);
}
my $query = RT::IR->ParseSimpleSearch(
Query => $q,
CurrentUser => $session{'CurrentUser'},
......
......@@ -3,7 +3,7 @@
use strict;
use warnings;
use RT::IR::Test tests => 20;
use RT::IR::Test tests => 24;
RT::Test->started_ok;
my $agent = default_agent();
......@@ -24,4 +24,10 @@ my $agent = default_agent();
$agent->get_ok( '/RTIR/index.html?q=192.168.1.1' );
$agent->content_like(qr{test ir});
$agent->get_ok( "/RTIR/index.html?q=$inc_id" );
is($agent->uri,$agent->rt_base_url."RTIR/Display.html?id=$inc_id","Directed to the Incident Page");
$agent->get_ok( "/RTIR/index.html?q=$ir_id" );
is($agent->uri,$agent->rt_base_url."RTIR/Display.html?id=$ir_id","Directed to the Report Page");
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment