My quick look says a fix would look something like this:
diff --git a/lib/RT/SLA.pm b/lib/RT/SLA.pm
index 791e76dc0..0cc649808 100644
--- a/lib/RT/SLA.pm
+++ b/lib/RT/SLA.pm
@@ -191,8 +191,9 @@ sub CalculateTime {
my $bhours = $self->BusinessHours( $agreement->{ 'BusinessHours' } );
my $time = $bhours->between( $last_time, $txn->CreatedObj->Unix );
if ( $time > 0 ) {
- $res = $bhours->add_seconds( $res, $time );
- }
+ for my $i (0..3) {
+ $res = $bhours->add_seconds( $res, $time / 4 );
+ }
}
else {
my $time = $txn->CreatedObj->Unix - $last_time;
@@ -209,9 +210,9 @@ sub CalculateTime {
if ( defined $agreement->{'BusinessMinutes'} ) {
if ( $agreement->{'BusinessMinutes'} ) {
- $res = $bhours->add_seconds(
- $res, 60 * $agreement->{'BusinessMinutes'},
- );
+ for my $i (0..3) {
+ $res = $bhours->add_seconds( $res, (60 * $agreement->{'BusinessMinutes'}) / 4 );
+ }
}
else {
$res = $bhours->first_after( $res );
Ref:
I am sure it can be made smarter than just dividing by 4 though