[Rt-commit] rt branch 5.0/fix-ticket-graph-saved-search created. rt-5.0.5-47-g5fe30cfc93
BPS Git Server
git at git.bestpractical.com
Thu Nov 16 18:54:54 UTC 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/fix-ticket-graph-saved-search has been created
at 5fe30cfc93c6079e8c0649729014d19675b1b935 (commit)
- Log -----------------------------------------------------------------
commit 5fe30cfc93c6079e8c0649729014d19675b1b935
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Nov 16 12:19:09 2023 -0500
Skip search menu process for ticket graph searches
Unlike other saved searches, ticket graph searches do not live under
/Search/ and do not have any menus either.
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 7718e61918..73a51b38d2 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -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";
diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index 19d0e68920..57c7240d57 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -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'} )
commit 43a2e4c84317dcd7f007394c12d0e3cc4f859234
Author: Brad Embree <brad at bestpractical.com>
Date: Sun Oct 23 17:14:02 2022 -0700
Remove id from search save args
If id is listed in the search save args then the search saves the ticket id
for the ticket being viewed when the search is saved. If the search is loaded
for a different ticket it shows the graph for the original ticket and not the
one currently being viewed.
diff --git a/share/html/Search/Elements/EditSearches b/share/html/Search/Elements/EditSearches
index 97e8d9bea4..c9db81f1b9 100644
--- a/share/html/Search/Elements/EditSearches
+++ b/share/html/Search/Elements/EditSearches
@@ -100,7 +100,7 @@
<div class="label col-4"><&|/l&>Permalink</&>:</div>
<div class="col-8">
<span class="form-control current-value">
- <a href="<% $m->request_path %>?sc=<% $saved_search->ShortenerObj->Code %>" class="permalink" data-toggle="tooltip" data-original-title="<% loc('Permalink to this saved search') %>" data-code="<% $saved_search->ShortenerObj->Code %>" data-url="<% $m->request_path %>?sc=<% $saved_search->ShortenerObj->Code %>"><% loc('View') %></a>
+ <a href="<% $m->request_path %>?sc=<% $saved_search->ShortenerObj->Code %>" class="permalink" data-toggle="tooltip" data-original-title="<% loc('Permalink to this saved search') %>" data-code="<% $saved_search->ShortenerObj->Code %>" data-url="<% $m->request_path %>?sc=<% $saved_search->ShortenerObj->Code %><% ($saved_search->Type // '') eq 'Graph' ? "&id=$DECODED_ARGS->{id}" : '' %>"><% loc('View') %></a>
</span>
</div>
</div>
diff --git a/share/html/Ticket/Graphs/index.html b/share/html/Ticket/Graphs/index.html
index d350c20de8..e372dffc1a 100644
--- a/share/html/Ticket/Graphs/index.html
+++ b/share/html/Ticket/Graphs/index.html
@@ -86,7 +86,7 @@ $m->callback( TicketObj => $ticket, ARGSRef => \%ARGS );
my @results;
-my @save_arguments = qw(id Direction LeadingLink ShowLinks MaxDepth FillUsing ShowLinkDescriptions);
+my @save_arguments = qw(Direction LeadingLink ShowLinks MaxDepth FillUsing ShowLinkDescriptions);
foreach my $level ( 0 .. 6 ) {
push @save_arguments, "Level-". $level ."-Properties";
}
commit 82929f5901096d18ab588b8a64a386fa61b6ac80
Author: Brad Embree <brad at bestpractical.com>
Date: Sun Sep 18 21:10:38 2022 -0700
Pass Graph Type to EditSearches
Otherwise graph searches would be saved as ticket searches.
diff --git a/share/html/Ticket/Graphs/index.html b/share/html/Ticket/Graphs/index.html
index 1543260bfb..d350c20de8 100644
--- a/share/html/Ticket/Graphs/index.html
+++ b/share/html/Ticket/Graphs/index.html
@@ -96,6 +96,7 @@ push @results, $m->comp( '/Search/Elements/EditSearches:Init',
Query => \%ARGS,
SavedSearch => $saved_search,
SearchFields => \@save_arguments,
+ Type => 'Graph',
);
$ARGS{'LeadingLink'} ||= 'Members';
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list