[Rt-commit] [rtir] 13/18: Update the RTIR Search Basics to be smarter

Jesse Vincent jesse at bestpractical.com
Wed Mar 11 03:36:47 EDT 2015


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

jesse pushed a commit to branch 3.4/remove_old_constituencies
in repository rtir.

commit 8ef3c6a6df5ceb51a7107b89abb882f54dfcb9e4
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Mar 10 21:39:23 2015 -0700

    Update the RTIR Search Basics to be smarter
    
    Update the RTIR Search Basics to be smarter
    about queue and status and constituency
---
 .../RTIR/Search/Elements/PickBasics/Default        | 24 ++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/html/Callbacks/RTIR/Search/Elements/PickBasics/Default b/html/Callbacks/RTIR/Search/Elements/PickBasics/Default
index 2a5ec0c..c411701 100644
--- a/html/Callbacks/RTIR/Search/Elements/PickBasics/Default
+++ b/html/Callbacks/RTIR/Search/Elements/PickBasics/Default
@@ -46,14 +46,26 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <%INIT>
-# I'm not sure why this isn't just "Only run on */Refine.html"
-# That would make the intent clearer.
-my $path = $m->request_comp->path;
+my $path = $r->path_info;
 return unless $path =~ m{^/RTIR};
-return if $path =~ m{^/RTIR/Search/index.html};
 foreach( @$Conditions ) {
-    next unless ($_->{'Name'}||'') eq 'Queue';
-    $_ = undef;
+    if (($_->{'Name'}||'') eq 'Queue' ) {
+    $_->{'Value'}{'Path'} = '/RTIR/Elements/SelectRTIRQueue';
+        $_->{'Value'}{'Arguments'}{'ShowNullOption'} = 1;
+    if (defined $m->{'RTIR_ConstituencyFilter'}) {
+        $_->{'Value'}{'Arguments'}{'Constituency'} = $m->{'RTIR_ConstituencyFilter'};
+        $_->{'Value'}{'Arguments'}{'LimitToConstituency'} = 1;
+        if (defined $m->request_args->{'Lifecycle'})  {
+             $_->{'Value'}{'Arguments'}{'Lifecycle'} = $m->request_args->{'Lifecycle'};
+        }
+    }}
+    elsif (($_->{'Name'}||'') eq 'Status' ) {
+        $_->{'Value'}{'Path'} = '/Elements/SelectStatus';
+        if (!defined $_{'Value'}{'Queues'} && defined $m->request_args->{'Lifecycle'}){
+            $_->{'Value'}{'Arguments'}{'Lifecycles'} = 
+                [RT::Lifecycle->Load($m->request_args->{'Lifecycle'})]
+        } 
+    }
 }
 </%INIT>
 <%ARGS>

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


More information about the rt-commit mailing list