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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sun Apr 6 22:49:32 EDT 2008


Author: sunnavy
Date: Sun Apr  6 22:49:23 2008
New Revision: 11605

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

Log:
age in inactive reports is the date range between resolved date and reports date

Modified: RT-Extension-Reports/html/Reports/Types/ActiveOrInactive
==============================================================================
--- RT-Extension-Reports/html/Reports/Types/ActiveOrInactive	(original)
+++ RT-Extension-Reports/html/Reports/Types/ActiveOrInactive	Sun Apr  6 22:49:23 2008
@@ -102,12 +102,13 @@
 
 if ( $Run ) {
     if ( $GroupBy eq 'date' ) {
-        @headers = ( 'Date', 'Queue', ucfirst $Type, '0-7', '8-14', '15-30', '31+' );
+        @headers = ( 'Date', 'Queue' );
     }
     else {
-        @headers = ( 'Queue', 'Date', ucfirst $Type, '0-7', '8-14', '15-30', '31+' );
+        @headers = ( 'Queue', 'Date' );
 
     }
+    push @headers, ucfirst $Type, '0-7', '8-14', '15-30', '31+';
 
     my ( $start_date, $end_date );
     $start_date = RT::Date->new( $session{CurrentUser} );
@@ -116,7 +117,7 @@
     $end_date->Set( Format => 'iso', Value => $EndDate . ' 00:00:00' );
 
 
-    $end_date->AddDay; # we want the date ranage to be inclusive
+    $end_date->AddDay; # we want the date range to be inclusive
     my $tickets = RT::Tickets->new( $session{CurrentUser} );
 
     $tickets->UnLimit;
@@ -163,7 +164,7 @@
                         $age = int( ($tmp_date->Unix - $ticket->CreatedObj->Unix)/3600/24) + 1;
                 }
                 else {
-                    $age = int( ($ticket->ResolvedObj->Unix - $ticket->CreatedObj->Unix)/3600/24) + 1;
+                    $age = int( ($tmp_date->Unix - $ticket->ResolvedObj->Unix)/3600/24 ) + 1;
                 }
 
                 $age = 1 if $age < 1; # make it 1 day if less than 1 day



More information about the Bps-public-commit mailing list