[Rt-commit] [rtir] 10/12: Pass through all the arguments on Incident Reply

Kevin Falcone falcone at bestpractical.com
Fri Jul 12 10:40:03 EDT 2013


This is an automated email from the git hooks/post-receive script.

falcone pushed a commit to branch 2.9/edit-search-regressions
in repository rtir.

commit 450d73418cf7c3ddff4f4c696dd7035329d84d22
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jul 11 22:38:52 2013 -0400

    Pass through all the arguments on Incident Reply
    
    Without this, you'll lose any checkbox state when you edit the search.
    It also ensure that knowing *which* types of children to search for are
    passed back through.
    
    Right now, nothing else uses the ExtraQueryParams argument, but we may
    find another Refine UI which needs it.
---
 html/RTIR/Incident/Reply/Refine.html | 8 +++++++-
 html/RTIR/Incident/Reply/index.html  | 8 +++++++-
 html/RTIR/Search/Elements/BuildQuery | 8 ++++++++
 html/RTIR/Search/Elements/RefinePage | 3 +++
 t/walk-web.t                         | 2 +-
 5 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/html/RTIR/Incident/Reply/Refine.html b/html/RTIR/Incident/Reply/Refine.html
index 24b3787..c4aae5b 100644
--- a/html/RTIR/Incident/Reply/Refine.html
+++ b/html/RTIR/Incident/Reply/Refine.html
@@ -56,10 +56,16 @@ return $m->comp(
     ResultPage => 'RTIR/Incident/Reply/?'. $m->comp('/Elements/QueryString',
         id => $ARGS{'id'}, All => $ARGS{'All'},
         Status => $ARGS{'Status'}, Action => $ARGS{'Action'},
+        SelectedReportsAll => $ARGS{'SelectedReportsAll'},
+        SelectedInvestigationsAll => $ARGS{'SelectedInvestigationsAll'},
+        SelectedBlocksAll => $ARGS{'SelectedBlocksAll'},
     ),
     BaseQuery => RT::IR->Query(
         Queue    => \@queues,
         MemberOf => $ARGS{'id'},
     ),
+    ExtraQueryParams => [qw(SelectedReportsAll SelectedInvestigationsAll
+                            All Status Action SelectedBlocksAll)],
+
 );
-</%INIT>
\ No newline at end of file
+</%INIT>
diff --git a/html/RTIR/Incident/Reply/index.html b/html/RTIR/Incident/Reply/index.html
index 510fc72..04b5dab 100644
--- a/html/RTIR/Incident/Reply/index.html
+++ b/html/RTIR/Incident/Reply/index.html
@@ -46,7 +46,13 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /RTIR/Elements/Header, Title => $title, Refresh => $session{'tickets_refresh_interval'} &>
-<& /Elements/Tabs &>
+<& /Elements/Tabs,
+    RefineArgs => { Query       => $Query,
+                    Format      => $Format,
+                    RowsPerPage => $Rows,
+                    Page        => $Page,
+                    Order       => $Order,
+                    OrderBy     => $OrderBy } &>
 
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $IncidentObj);
 <& /Elements/ListActions, actions => \@results &>
diff --git a/html/RTIR/Search/Elements/BuildQuery b/html/RTIR/Search/Elements/BuildQuery
index fdfa906..0428aad 100644
--- a/html/RTIR/Search/Elements/BuildQuery
+++ b/html/RTIR/Search/Elements/BuildQuery
@@ -50,10 +50,17 @@
 <input type="hidden" class="hidden" name="SavedSearchId" value="<% $saved_search{'Id'} %>" />
 <input type="hidden" class="hidden" name="ResultPage" value="<% $ResultPage %>" />
 <input type="hidden" class="hidden" name="BaseQuery" value="<% $BaseQuery %>" />
+
 % if ( $DECODED_ARGS->{id} ) {
     <input type="hidden" class="hidden" name="id" value="<% $DECODED_ARGS->{id} %>" />
 % }
 
+% for my $input ( @ExtraQueryParams ) {
+%   if ( $DECODED_ARGS->{$input} ) {
+<input type="hidden" class="hidden" name="<% $input %>" value="<% $DECODED_ARGS->{$input} %>" />
+%   }
+% }
+
 <input type="hidden" class="hidden" name="Query" value="<% $query{'Query'} %>" />
 <input type="hidden" class="hidden" name="Format" value="<% $query{'Format'} %>" />
 
@@ -98,4 +105,5 @@ $dirty => undef
 $AvailableColumns => undef
 $CurrentFormat => undef
 $ResultPage => undef
+ at ExtraQueryParams => ()
 </%ARGS>
diff --git a/html/RTIR/Search/Elements/RefinePage b/html/RTIR/Search/Elements/RefinePage
index 640e057..89f3c81 100644
--- a/html/RTIR/Search/Elements/RefinePage
+++ b/html/RTIR/Search/Elements/RefinePage
@@ -54,6 +54,8 @@
     ResultPage => $ResultPage,
 
     actions    => \@results, 
+
+    ExtraQueryParams => \@ExtraQueryParams,
 &>
 
 <%INIT>
@@ -71,4 +73,5 @@ my $QueryString = $m->comp( '/Elements/QueryString', %{ $query_state{'query'} }
 $Title => loc("Refine Search")
 $ResultPage => 'RTIR/Search/Results.html',
 $BaseQuery => '',
+ at ExtraQueryParams => ()
 </%ARGS>
diff --git a/t/walk-web.t b/t/walk-web.t
index fe9abe6..9ae2e30 100644
--- a/t/walk-web.t
+++ b/t/walk-web.t
@@ -5,7 +5,7 @@ use warnings;
 
 use HTML::TreeBuilder;
 
-use RT::IR::Test tests => 564;
+use RT::IR::Test tests => 594;
 
 RT::Test->started_ok;
 my $m = default_agent();

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Rt-commit mailing list