[Rt-commit] rtir branch, 2.9-trunk, updated. 2.6.1-540-gdb38f1a

Kevin Falcone falcone at bestpractical.com
Wed Nov 23 16:11:09 EST 2011


The branch, 2.9-trunk has been updated
       via  db38f1abf03636a80a6dddf9a1d9a1b17a24ebba (commit)
       via  cd265fff7ab1f3cbdc62d7a8c0a232c8d09156a5 (commit)
       via  818e2428287099aaa2a614da79ea9fc61f9e186f (commit)
      from  3fdf53c8da9e9545ebac8e0bb38602a4ff874521 (commit)

Summary of changes:
 META.yml                             |    2 -
 Makefile.PL                          |    4 -
 lib/RT/IR.pm                         |    2 -
 lib/RT/IR/AdministrationTutorial.pod |   13 ++--
 lib/RT/IR/Tutorial.pod               |    4 +-
 reports/report.pl                    |  123 ----------------------------------
 6 files changed, 8 insertions(+), 140 deletions(-)
 delete mode 100644 reports/report.pl

- Log -----------------------------------------------------------------
commit 818e2428287099aaa2a614da79ea9fc61f9e186f
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Nov 23 15:27:35 2011 -0500

    Strengthen and clarify some of the SLA documentation

diff --git a/lib/RT/IR/AdministrationTutorial.pod b/lib/RT/IR/AdministrationTutorial.pod
index c6b7182..beb2c90 100644
--- a/lib/RT/IR/AdministrationTutorial.pod
+++ b/lib/RT/IR/AdministrationTutorial.pod
@@ -344,12 +344,11 @@ L<RT::Extension::SLA> was prototyped on it, but heavily improved. In RTIR 3.0
 we got rid of SLA implementation in the core of RTIR that was in conflict
 with the extension.
 
-One thing still is in RTIR. Due date of Incidents is synchronized with
-the most due active children. This is done with scrips described above
-and can be disabled if really required.
-
-As due date of incidents is controlled by RTIR's scrips then using extension
-for Incidents queue is wrong and result in race. If you don't set default
-service level for the queue in the extension's config then you are safe.
+If you install and configure L<RT::Extension::SLA> do not apply it to
+the Incidents Queue.  You will encounter a race condition between the
+extension and the RTIR Scrips that synchronize due dates between
+an Incident and its most due active child.  If you need to manage
+Incident due dates using the SLA extension, you can disable the RTIR
+Scrips that manage Due dates on the Incidents Queue.
 
 =cut
diff --git a/lib/RT/IR/Tutorial.pod b/lib/RT/IR/Tutorial.pod
index 50fcfe1..fbb521e 100644
--- a/lib/RT/IR/Tutorial.pod
+++ b/lib/RT/IR/Tutorial.pod
@@ -9,8 +9,8 @@ Reports, Incidents, Investigations and Blocks.
 
 Incident Reports is where new reports appear. When a user sends email to the
 address you set up, RTIR automatically creates an Incident Report (IR), and
-sets its due date according to your organization's SLA rules. New Incident
-Reports appear on the RTIR main page, ordered by due date.
+sets its due date according to SLA rules configured by your Administrator.
+New Incident Reports appear on the RTIR main page, ordered by due date.
 
 =head3 Incidents
 

commit cd265fff7ab1f3cbdc62d7a8c0a232c8d09156a5
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Nov 23 15:30:15 2011 -0500

    We no longer use Business::SLA

diff --git a/META.yml b/META.yml
index b0cf526..5d1f559 100644
--- a/META.yml
+++ b/META.yml
@@ -26,7 +26,6 @@ no_index:
     - t
 requires:
   Business::Hours: 0
-  Business::SLA: 0
   DBIx::SearchBuilder: 1.61
   Hook::LexWrap: 0
   Net::Whois::RIPE: 0
diff --git a/Makefile.PL b/Makefile.PL
index b2a98ca..acbd989 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -22,8 +22,6 @@ requires('DBIx::SearchBuilder', 1.61);
 
 # work hours
 requires('Business::Hours');
-# service level agreement
-requires('Business::SLA');
 # whois tool
 requires('Net::Whois::RIPE');
 # IP searching
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 7ac5dc8..a953df4 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -54,7 +54,6 @@ our $VERSION = '2.6.1';
 
 
 use Business::Hours;
-use Business::SLA;
 use Scalar::Util qw(blessed);
 
 

commit db38f1abf03636a80a6dddf9a1d9a1b17a24ebba
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Nov 23 16:10:13 2011 -0500

    Remove the Business::Hours dep
    
    reports.pl was written in 2003, but has been unmaintained since 2005.

diff --git a/META.yml b/META.yml
index 5d1f559..e9258a1 100644
--- a/META.yml
+++ b/META.yml
@@ -25,7 +25,6 @@ no_index:
     - po
     - t
 requires:
-  Business::Hours: 0
   DBIx::SearchBuilder: 1.61
   Hook::LexWrap: 0
   Net::Whois::RIPE: 0
diff --git a/Makefile.PL b/Makefile.PL
index acbd989..79c2bbb 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -20,8 +20,6 @@ unshift @INC, $local_lib_path, $lib_path;
 # RTIR needs this version of SB because of cud-from-select
 requires('DBIx::SearchBuilder', 1.61);
 
-# work hours
-requires('Business::Hours');
 # whois tool
 requires('Net::Whois::RIPE');
 # IP searching
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index a953df4..16995d5 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -53,7 +53,6 @@ package RT::IR;
 our $VERSION = '2.6.1';
 
 
-use Business::Hours;
 use Scalar::Util qw(blessed);
 
 
diff --git a/reports/report.pl b/reports/report.pl
deleted file mode 100644
index 8864d55..0000000
--- a/reports/report.pl
+++ /dev/null
@@ -1,123 +0,0 @@
-# of new reports outstanding at month start
-my $outstanding = RT::Tickets->new($session{'CurrentUser'});
-$outstanding->FromSQL("Queue = 'Incident Reports' AND Created <= '$monthstart' AND ( Resolved >= '$monthstart' OR Resolved IS NULL)");
-
-
-# of new reports created during the month
-my $tix_created = RT::Tickets->new($session{'CurrentUser'});
-$tix_created->FromSQL("Queue = 'Incident Report' AND Created >= '$monthstart' AND Created <= '$monthend');
-
-
-# of new reports resolved/closed/deleted during the month
-# does this mean "number of reports closed during the month or number of reports created during the month that were also closed during the month?
-
-my $tix_resolved = RT::Tickets->new($session{'CurrentUser'});
-$tix_resolved->FromSQL("Queue = 'Incident Report' AND Created >= '$monthstart' AND Created <= '$monthend' AND Resolved >= '$monthstart' AND Resolved <= '$monthend'");
-
-
-# of new reports oustanding at month end 
-# same question: does this mean "number of reports closed during the month or number of reports created during the month that were also closed during the month?
-
-my $tix_unresolved = RT::Tickets->new($session{'CurrentUser'});
-$tix_unresolved->FromSQL("Queue = 'Incident Report' AND Created >= '$monthstart' AND Created <= '$monthend' AND (Resolved >= '$monthend' OR Resolved IS NULL");
-
-
-
-print "At the start of the month (".localtime($monthstart)."):\n";
-print "\n\n";
-print "Outstanding incident reports: ".$outstanding->Count."\n";
-print "Reports closed between ".localtime($monthstart). " and ". localtime($monthend).": " $tix_resolved->Count;
-print "Reports created between ".localtime($monthstart). " and ". localtime($monthend)." which were unresolved as of ". localtime($monthend).": " $tix_unresolved->Count;
-
-
-
-         # of new reports created during the month broken down by
-         classification
-         my $windows  = { 'full service serious' => (within 1 hour),
-                          'full service minor' =>  (within 2 hours),  
-                         'reduced service emergency'=> (call out n/a)
-                         'requests for information' =>  (1 day)
-                         };
-
-	 
- 
-          foreach my $service_level (@$Classifications) {
-		my $class_tix = RT::Tickets->new($session{'CurrentUser'});
-		    $class_tix->FromSQL("Queue = 'Incident Reports' AND Created >= '$monthstart' AND Created <= $monthend AND 'Incident Reports.{SLA}' = '$service_level'");
-            print "$service_level Incident Reports created between ".localtime($monthstart). " and ".localtime($monthend).": ".$class_tix->Count."\n";
-         }
-
-                 All tickets created in queue IncidentReport created after
-                 monthstart and before monthend where 
-                 there was outbound correspondence within $windows{$Classification};
-
-No need to break down incident type against response time.
-classification (eg response time) needs to be calculated somehow, and to 
-take account of nwh. (eg the clock stops tickets at 1800 and starts 
-again at 0800 and reports received at 8am on a Saturday are not measured 
-until 0800 Monday ownwards...etc)
-
-eg
- All tickets created in queue IncidentReport created after monthstart and
- before monthend where there was outbound correspondence within
- $windows{$Classification};
-
-my $sla_check = RT::Tickets->new($session{'CurrentUser'});
-
-$sla_check->FromSQL("Created >= $monthstart AND Created <= $monthend AND Queue='Incident Reports'");
-
-
-# Get a Business::Hours object for the period in question
-
-my $business_hours = Business::Hours->new();
-$business_hours->set_business_hours(%working_hours);
-$business_hours->for_timespan(Start => $monthstart, End => $monthend);
-
-while (my $t = $sla_check->Next) {
-    # XXX: is this bug? we don't use this variables
-    my $sla = $t->FirstCustomFieldValue('SLA');
-    my $time_on_clock = $business_hours->between($t->CreatedObj->Unix, $t->ResolvedObj->Unix);
- 
-
-
-         # of email messages created by CERT staff, broken down by Queue (incident, incident report, investigation)
-         # of email messages received by CERT, broken down by Queue (incident, incident report, investigation)
-        my $txns = RT::Transactions->new($session{'CurrentUser'});
-        $txns->Limit(FIELD => 'Created', OPERATOR => '>=', VALUE => $monthstart);
-        $txns->Limit(FIELD => 'Created', OPERATOR => '<=', VALUE => $monthstart);
-        while (my $txn = $txns->Next) {
-                my $q = $txn->TicketObj->QueueObj->Name;
-                my $inbound = ($txn->IsInbound || 0);
-                $created{$q}{$inbound}++;
-        } 
-
-
-
-
-#         Average time from creation to close for incidents for all incidents
-#         closed within this time period
-# 	This doesn't currently take into account "business hours"
-
-
-        my $avgtime = RT::Tickets->new($session{'CurrentUser'});
-	$avgtime->FromSQL(Queue = 'Incident Reports' AND Resolved >= '$monthstart' AND Resolved <= '$monthend');
-
-        
-        my $i;
-        my $total_diff;
-        while (my $t = $avgtime->Next) {
-                $i++;
-                my $ctime = $t->CreatedObj->Unix;
-                my $rtime = $t->ResolvedObj->Unix;
-                
-                my $diff = $rtime - $ctime;
-                $total_diff += $diff;
-
-        }
-        # XXX: we don't use this. What this code for
-        my $average_secs = $total_diff/$i;
-
-
-
-}
-

-----------------------------------------------------------------------


More information about the Rt-commit mailing list