[Rt-commit] r6440 - in rtir/branches/2.1-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Wed Nov 15 23:57:14 EST 2006
Author: ruz
Date: Wed Nov 15 23:57:13 2006
New Revision: 6440
Modified:
rtir/branches/2.1-EXPERIMENTAL/ (props changed)
rtir/branches/2.1-EXPERIMENTAL/lib/RT/IR.pm
Log:
r1836 at cubic-pc: cubic | 2006-11-15 23:08:01 +0300
* modules descriptions
Modified: rtir/branches/2.1-EXPERIMENTAL/lib/RT/IR.pm
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/lib/RT/IR.pm (original)
+++ rtir/branches/2.1-EXPERIMENTAL/lib/RT/IR.pm Wed Nov 15 23:57:13 2006
@@ -54,8 +54,17 @@
use Business::Hours;
use Business::SLA;
-sub BusinessHours {
+=head1 FUNCTIONS
+
+=head2 BusinessHours
+
+Returns L<Business::Hours> object initilized with information from
+the config file. See option 'BusinessHours'.
+
+=cut
+
+sub BusinessHours {
my $bizhours = new Business::Hours;
if ( RT->Config->Get('BusinessHours') ) {
$bizhours->business_hours( %{ RT->Config->Get('BusinessHours') } );
@@ -64,26 +73,37 @@
return $bizhours;
}
-sub DefaultSLA {
+=head2 DefaultSLA
- my $sla;
- my $SLAObj = SLAInit();
- $sla = $SLAObj->SLA(time());
+TODO: Not yet described.
- return $sla;
+=cut
+sub DefaultSLA {
+ my $SLAObj = SLAInit();
+ return $SLAObj->SLA( time );
}
+=head2 SLAInit
+
+Returns an object of L<Business::SLA> class or class defined in SLAModule
+config option.
+
+See also the following options: SLAModule, _RTIR_SLA_inhours_default,
+_RTIR_SLA_outofhours_default and SLA.
+
+=cut
+
sub SLAInit {
my $class = RT->Config->Get('SLAModule') || 'Business::SLA';
my $SLAObj = $class->new();
- my $bh = RT::IR::BusinessHours();
$SLAObj->SetInHoursDefault( RT->Config->Get('_RTIR_SLA_inhours_default') );
$SLAObj->SetOutOfHoursDefault( RT->Config->Get('_RTIR_SLA_outofhours_default') );
+ my $bh = RT::IR::BusinessHours();
$SLAObj->SetBusinessHours($bh);
my $SLA = RT->Config->Get('SLA');
@@ -96,7 +116,6 @@
}
return $SLAObj;
-
}
{
More information about the Rt-commit
mailing list