[Bps-public-commit] r9472 - in RT-Extension-SLA/lib/RT: Action

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Oct 26 12:24:16 EDT 2007


Author: sunnavy
Date: Fri Oct 26 12:24:16 2007
New Revision: 9472

Modified:
   RT-Extension-SLA/lib/RT/Action/SLA_SetStarts.pm
   RT-Extension-SLA/lib/RT/Extension/SLA.pm

Log:
bugs fix

Modified: RT-Extension-SLA/lib/RT/Action/SLA_SetStarts.pm
==============================================================================
--- RT-Extension-SLA/lib/RT/Action/SLA_SetStarts.pm	(original)
+++ RT-Extension-SLA/lib/RT/Action/SLA_SetStarts.pm	Fri Oct 26 12:24:16 2007
@@ -26,6 +26,11 @@
     my $self = shift;
 
     my $ticket = $self->TicketObj;
+
+# XXX I encountered a 'Couldn't set starts date: That is already the current 
+# value' warning if I didn't test it here. wierd
+    return 0 if $ticket->StartsObj->Unix > 0;
+
     my $level = $ticket->FirstCustomFieldValue('SLA');
     unless ( $level ) {
         $RT::Logger->debug('Ticket #'. $ticket->id .' has no service level defined, skip setting Starts');

Modified: RT-Extension-SLA/lib/RT/Extension/SLA.pm
==============================================================================
--- RT-Extension-SLA/lib/RT/Extension/SLA.pm	(original)
+++ RT-Extension-SLA/lib/RT/Extension/SLA.pm	Fri Oct 26 12:24:16 2007
@@ -236,7 +236,7 @@
             %{ $RT::BusinessHours{ $meta->{BusinessHours} || 'Default' } } );
         $res = $bhours->add_seconds( $res, 60 * $agreement->{'BusinessMinutes'} );
     }
-    $res += $agreement->{'RealMinutes'}
+    $res += 60 * $agreement->{'RealMinutes'}
         if defined $agreement->{'RealMinutes'};
 
     return $res;



More information about the Bps-public-commit mailing list