Skip to content

Commit

Permalink
Skip search menu process for ticket graph searches
Browse files Browse the repository at this point in the history
Unlike other saved searches, ticket graph searches do not live under
/Search/ and do not have any menus either.
  • Loading branch information
sunnavy committed Nov 16, 2023
1 parent 43a2e4c commit 5fe30cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/RT/Interface/Web.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,10 @@ sub ExpandShortenerCode {
if ( $type eq 'Chart' ) {
$content->{SavedChartSearchId} = $id;
}
elsif ( $type eq 'Graph' ) {
$content->{SavedSearchId} = $id;
$content->{SearchType} = 'Graph';
}
else {
$content->{SavedSearchId} = $id;
$content->{Class} = "RT::${type}s";
Expand Down
1 change: 1 addition & 0 deletions lib/RT/Interface/Web/MenuBuilder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ sub BuildMainNav {
(
$request_path =~ m{^/(?:Ticket|Transaction|Search)/}
&& $request_path !~ m{^/Search/Simple\.html}
&& ($HTML::Mason::Commands::DECODED_ARGS->{SearchType} // '') ne 'Graph'
)
|| ( $request_path =~ m{^/Search/Simple\.html}
&& $HTML::Mason::Commands::DECODED_ARGS->{'q'} )
Expand Down

0 comments on commit 5fe30cf

Please sign in to comment.