[Rt-commit] r4242 - in rtir/branches/1.9-EXPERIMENTAL: .
lib/RT/Action
ruz at bestpractical.com
ruz at bestpractical.com
Sun Dec 4 19:08:41 EST 2005
Author: ruz
Date: Sun Dec 4 19:08:41 2005
New Revision: 4242
Modified:
rtir/branches/1.9-EXPERIMENTAL/ (props changed)
rtir/branches/1.9-EXPERIMENTAL/lib/RT/Action/RTIR_SetDueReopen.pm
Log:
r421 at cubic-pc: cubic | 2005-12-05 03:09:09 +0300
r400 at cubic-pc: cubic | 2005-12-04 23:42:39 +0300
* use one time() value for all actions
Modified: rtir/branches/1.9-EXPERIMENTAL/lib/RT/Action/RTIR_SetDueReopen.pm
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/lib/RT/Action/RTIR_SetDueReopen.pm (original)
+++ rtir/branches/1.9-EXPERIMENTAL/lib/RT/Action/RTIR_SetDueReopen.pm Sun Dec 4 19:08:41 2005
@@ -46,9 +46,8 @@
#
package RT::Action::RTIR_SetDueReopen;
-
use strict;
-
+use RT::IR;
use base 'RT::Action::RTIR';
=head2 Prepare
@@ -73,8 +72,6 @@
sub Commit {
my $self = shift;
- use RT::IR;
-
# create a new SLA object
my $SLAObj = RT::IR::SLAInit();
@@ -82,17 +79,18 @@
my $bh = RT::IR::BusinessHours();
# Set the defaults from the RTIR_Config.pm file
- $SLAObj->SetInHoursDefault($RT::SLA_Reopen_InHours);
- $SLAObj->SetOutOfHoursDefault($RT::SLA_Reopen_OutOfHours);
+ $SLAObj->SetInHoursDefault( $RT::SLA_Reopen_InHours );
+ $SLAObj->SetOutOfHoursDefault( $RT::SLA_Reopen_OutOfHours );
- $SLAObj->SetBusinessHours($bh);
+ $SLAObj->SetBusinessHours( $bh );
# get the due date
- my $due = $SLAObj->Due(time(), $SLAObj->SLA(time()));
+ my $time = time;
+ my $due = $SLAObj->Due( $time, $SLAObj->SLA( $time ) );
- my $date = RT::Date->new($RT::SystemUser);
- $date->Set(Format => 'unix', Value => $due);
- $self->TicketObj->SetDue($date->ISO);
+ my $date = RT::Date->new( $RT::SystemUser );
+ $date->Set( Format => 'unix', Value => $due );
+ $self->TicketObj->SetDue( $date->ISO );
return 1;
}
More information about the Rt-commit
mailing list