[Rt-commit] [rtir] 17/24: Switch QueueSummaryByLifecycle to just use lifecycles

Jesse Vincent jesse at bestpractical.com
Mon Feb 9 00:25:23 EST 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 906a35c82df761b111bd8a29ab4dfa573317bf8b
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sun Feb 8 19:38:00 2015 -0800

    Switch QueueSummaryByLifecycle to just use lifecycles
---
 .../RTIR/Elements/QueueSummaryByLifecycle/SQLFilter  |  4 ++--
 html/Callbacks/RTIR/Elements/Tabs/Privileged         | 20 ++++++++++----------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/html/Callbacks/RTIR/Elements/QueueSummaryByLifecycle/SQLFilter b/html/Callbacks/RTIR/Elements/QueueSummaryByLifecycle/SQLFilter
index ad4ef4f..0a4e27d 100644
--- a/html/Callbacks/RTIR/Elements/QueueSummaryByLifecycle/SQLFilter
+++ b/html/Callbacks/RTIR/Elements/QueueSummaryByLifecycle/SQLFilter
@@ -46,11 +46,11 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <%INIT>
-for my $type (RT::IR->Queues) {
+for my $type (RT::IR->Lifecycles) {
 # displaying on the RTIR homepage
 # we don't have a good solution for showing this on an RTIR dashboard
     if ( $m->request_comp->path =~ m{^/RTIR/} ){
-        $Queues->Limit( FIELD => 'Name',
+        $Queues->Limit( FIELD => 'Lifecycle',
                         OPERATOR => '=',
                         VALUE => $type,
                         SUBCLAUSE => 'RTIRQueues',
diff --git a/html/Callbacks/RTIR/Elements/Tabs/Privileged b/html/Callbacks/RTIR/Elements/Tabs/Privileged
index 6d1a43f..cb9e6f8 100644
--- a/html/Callbacks/RTIR/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTIR/Elements/Tabs/Privileged
@@ -399,22 +399,22 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update|Forward|
 } elsif ( $request_path =~ m{^/RTIR/(Search/|Incident/BulkAbandon\.html$|Report/BulkReject\.html$)} ) {
     my %args = $search_arguments->();
 
-    my $queue = $args->{'Queue'} || '';
-    unless ( $queue ) {
+    my $lifecycle = $args->{'Lifecycle'} || '';
+    unless ( $lifecycle ) {
         if ( $request_path =~ /Incident/ ) {
-            $queue = 'Incidents';
+            $lifecycle = 'incidents';
         }
         elsif ( $request_path =~ /Report/ ) {
-            $queue = 'Incident Reports';
+            $lifecycle = 'incident_reports';
         }
     }
-    unless ( $queue ) {
-        my (undef, @queues) = RT::IR->OurQuery( $args{'Query'} );
-        $queue = $queues[0] if @queues == 1;
+    unless ( $lifecycle ) {
+        my (undef, @lifecycles) = RT::IR->OurQuery( $args{'Query'} );
+        $lifecycle = $lifecycles[0] if @lifecycles == 1;
     }
     my $type = RT::IR::TicketType( Lifecycle => $lifecycle ) || '';
 
-    $args{'Queue'} = $queue if $queue;
+    $args{'Lifecycle'} = $lifecycle if $lifecycle;
 
     if ( $args{'Query'} ) {
         PageMenu()->child(
@@ -471,8 +471,8 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update|Forward|
         );
 
         # other paths need query defined
-        $args{'Query'} = RT::IR->Query( Queue => $args{'Queue'} )
-            if !$args{'Query'} && $args{'Queue'};
+        $args{'Query'} = RT::IR->Query( Lifecycle => $args{'Lifecycle'} )
+            if !$args{'Query'} && $args{'Lifecycle'};
 
         my $RSSPath = join '/', map $m->interp->apply_escapes( $_, 'u' ),
             $session{'CurrentUser'}->UserObj->Name,

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


More information about the rt-commit mailing list