[Rt-commit] rt branch, 4.2/preserve-saved-search-id, created. rt-4.1.8-414-g21a3340

Ruslan Zakirov ruz at bestpractical.com
Fri May 24 04:51:09 EDT 2013


The branch, 4.2/preserve-saved-search-id has been created
        at  21a33403b64f5fab75241a8e38a19ce9d15e10ac (commit)

- Log -----------------------------------------------------------------
commit 29fe5dedfa6bcf7ec573094e25c87f5311fed664
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri May 24 12:41:27 2013 +0400

    pass around SavedSearchId and SavedChartSearchId
    
    otherwise people loose binding to the loaded saved search and
    can not update it - our UI doesn't allow to update existing
    saved search without loading it first, but loading resets all
    changes.
    
    Changing sort order on Results.html page was loosing
    saved search id.
    
    Updating tickets via Bulk.html was loosing saved search id.

diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index e868b53..01648e0 100644
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -50,7 +50,7 @@
 
 <& /Elements/ListActions, actions => \@results &>
 <form method="post" action="<% RT->Config->Get('WebPath') %>/Search/Bulk.html" enctype="multipart/form-data" name="BulkUpdate" id="BulkUpdate">
-% foreach my $var (qw(Query Format OrderBy Order Rows Page SavedChartSearchId Token)) {
+% foreach my $var (qw(Query Format OrderBy Order Rows Page SavedSearchId SavedChartSearchId Token)) {
 <input type="hidden" class="hidden" name="<%$var%>" value="<%$ARGS{$var} || ''%>" />
 %}
 <& /Elements/CollectionList, 
diff --git a/share/html/Search/Results.html b/share/html/Search/Results.html
index 3cf2cb0..6b72a89 100644
--- a/share/html/Search/Results.html
+++ b/share/html/Search/Results.html
@@ -62,9 +62,11 @@
     Page => $Page,
     Format => $Format,
     Class => 'RT::Tickets',
-    BaseURL => $BaseURL
-
-   &>
+    BaseURL => $BaseURL,
+    SavedSearchId => $ARGS{'SavedSearchId'},
+    SavedChartSearchId => $ARGS{'SavedChartSearchId'},
+    PassArguments => [qw(Query Format Rows Page Order OrderBy SavedSearchId SavedChartSearchId)],
+&>
 % $m->callback( ARGSRef => \%ARGS, CallbackName => 'AfterResults' );
 
 % my %hiddens = (Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order, HideResults => $HideResults, Page => $Page, SavedChartSearchId => $SavedChartSearchId );

commit 21a33403b64f5fab75241a8e38a19ce9d15e10ac
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri May 24 12:45:11 2013 +0400

    drop unused variables

diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index 01648e0..4c7894b 100644
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -371,6 +371,4 @@ $RowsPerPage => undef
 $Order => 'ASC'
 $OrderBy => 'id'
 $Query => undef
-$SavedSearchId => undef
-$SavedChartSearchId => undef
 </%args>

-----------------------------------------------------------------------


More information about the Rt-commit mailing list