Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
best-practical
rtir
Commits
aea995ff
Commit
aea995ff
authored
Jul 23, 2013
by
Kevin Falcone
Browse files
Merge branch '3.0/simple-search-ticket-redirect' into 3.0.0-releng
parents
6e91c4ed
2a38e0f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
html/RTIR/index.html
View file @
aea995ff
...
...
@@ -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'},
...
...
t/searches/simple.t
View file @
aea995ff
...
...
@@ -3,7 +3,7 @@
use
strict
;
use
warnings
;
use
RT::IR::
Test
tests
=>
2
0
;
use
RT::IR::
Test
tests
=>
2
4
;
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
");
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment