[Bps-public-commit] r11633 - RT-Extension-Reports/html/Reports/Types

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Apr 8 08:57:34 EDT 2008


Author: sunnavy
Date: Tue Apr  8 08:57:34 2008
New Revision: 11633

Modified:
   RT-Extension-Reports/html/Reports/Types/ActiveOrInactive
   RT-Extension-Reports/html/Reports/Types/General
   RT-Extension-Reports/html/Reports/Types/TicketsMoved

Log:
Added Age filter support for ActiveOrInactive, General and TicketMoved

Modified: RT-Extension-Reports/html/Reports/Types/ActiveOrInactive
==============================================================================
--- RT-Extension-Reports/html/Reports/Types/ActiveOrInactive	(original)
+++ RT-Extension-Reports/html/Reports/Types/ActiveOrInactive	Tue Apr  8 08:57:34 2008
@@ -133,6 +133,14 @@
         $tmp_date->Set( Value => $start_date->Unix );
 
         while ( $tmp_date->Unix < $end_date->Unix ) {
+            # don't want to switch the two loops because I doubt 
+            # the ticket loop take more time, since it's from db
+
+            # filter again, now that we have current reports date
+            # the reason we call filter twice is for efficiency
+            if ( $Filter ) {
+                    next TICKET unless RT::Extension::Reports::Filter::filter_ticket( Filter => $Filter, Ticket => $ticket, Date => $tmp_date, OnlyDate => 1 );
+            }
 
             if ( $ticket->CreatedObj->Date le $tmp_date->Date ) {
             my $txns = $ticket->Transactions;
@@ -174,7 +182,7 @@
                     $data{$tmp_date->Date}{$ticket->QueueObj->Name}{'31+'}++;
                 }
             }
-        }
+            }
             $tmp_date->AddDay;
         }
     }

Modified: RT-Extension-Reports/html/Reports/Types/General
==============================================================================
--- RT-Extension-Reports/html/Reports/Types/General	(original)
+++ RT-Extension-Reports/html/Reports/Types/General	Tue Apr  8 08:57:34 2008
@@ -118,6 +118,9 @@
         $tmp_date->Set( Value => $start_date->Unix );
 
         while ( $tmp_date->Unix < $end_date->Unix ) {
+            if ( $Filter ) {
+                    next TICKET unless RT::Extension::Reports::Filter::filter_ticket( Filter => $Filter, Ticket => $ticket, Date => $tmp_date, OnlyDate => 1 );
+            }
 
             if ( $ticket->CreatedObj->Date le $tmp_date->Date ) {
 

Modified: RT-Extension-Reports/html/Reports/Types/TicketsMoved
==============================================================================
--- RT-Extension-Reports/html/Reports/Types/TicketsMoved	(original)
+++ RT-Extension-Reports/html/Reports/Types/TicketsMoved	Tue Apr  8 08:57:34 2008
@@ -134,6 +134,9 @@
         $tmp_date->Set( Value => $start_date->Unix );
 
         while ( $tmp_date->Unix < $end_date->Unix ) {
+            if ( $Filter ) {
+                    next TICKET unless RT::Extension::Reports::Filter::filter_ticket( Filter => $Filter, Ticket => $ticket, Date => $tmp_date, OnlyDate => 1 );
+            }
 
             my $txns = $ticket->Transactions;
             $txns->Limit( FIELD => 'Type', VALUE => 'Set', ENTRYAGGREGATOR



More information about the Bps-public-commit mailing list