[Bps-public-commit] r10824 - in RT-Extension-SLA: t
ruz at bestpractical.com
ruz at bestpractical.com
Wed Feb 13 23:28:18 EST 2008
Author: ruz
Date: Wed Feb 13 23:28:18 2008
New Revision: 10824
Modified:
RT-Extension-SLA/lib/RT/Extension/SLA.pm
RT-Extension-SLA/t/business_hours.t
RT-Extension-SLA/t/due.t
RT-Extension-SLA/t/queue.t
RT-Extension-SLA/t/starts.t
Log:
* replace RT::SLA option with RT::ServiceAgreements as
the former conflicts with RTIR's built-in SLAs
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 Wed Feb 13 23:28:18 2008
@@ -238,7 +238,7 @@
my $self = shift;
my %args = ( Level => undef, Type => 'Response', Time => undef, @_ );
- my $meta = $RT::SLA{'Levels'}{ $args{'Level'} };
+ my $meta = $RT::ServiceAgreements{'Levels'}{ $args{'Level'} };
return undef unless $meta;
return undef unless $meta->{ $args{'Type'} };
@@ -277,7 +277,7 @@
my $agreement = $self->Agreement( %args );
return undef unless $agreement;
- my $meta = $RT::SLA{'Levels'}{ $args{'Level'} };
+ my $meta = $RT::ServiceAgreements{'Levels'}{ $args{'Level'} };
my $res = $args{'Time'};
if ( defined $agreement->{'BusinessMinutes'} ) {
@@ -294,7 +294,7 @@
my $self = shift;
my %args = ( Level => undef, Time => undef, @_ );
- my $meta = $RT::SLA{'Levels'}{ $args{'Level'} };
+ my $meta = $RT::ServiceAgreements{'Levels'}{ $args{'Level'} };
return undef unless $meta;
return $args{'Time'} if $meta->{'StartImmediately'};
@@ -333,11 +333,11 @@
else {
return $args{'Queue'}->SLA if $args{'Queue'}->SLA;
}
- if ( $RT::SLA{'QueueDefault'} && $RT::SLA{'QueueDefault'}{ $args{'Queue'}->Name } ) {
- return $RT::SLA{'QueueDefault'}{ $args{'Queue'}->Name };
+ if ( $RT::ServiceAgreements{'QueueDefault'} && $RT::ServiceAgreements{'QueueDefault'}{ $args{'Queue'}->Name } ) {
+ return $RT::ServiceAgreements{'QueueDefault'}{ $args{'Queue'}->Name };
}
}
- return $RT::SLA{'Default'};
+ return $RT::ServiceAgreements{'Default'};
}
=head1 TODO
Modified: RT-Extension-SLA/t/business_hours.t
==============================================================================
--- RT-Extension-SLA/t/business_hours.t (original)
+++ RT-Extension-SLA/t/business_hours.t Wed Feb 13 23:28:18 2008
@@ -23,7 +23,7 @@
{
no warnings 'once';
- %RT::SLA = (
+ %RT::ServiceAgreements = (
Default => 'Sunday',
Levels => {
Sunday => {
Modified: RT-Extension-SLA/t/due.t
==============================================================================
--- RT-Extension-SLA/t/due.t (original)
+++ RT-Extension-SLA/t/due.t Wed Feb 13 23:28:18 2008
@@ -16,7 +16,7 @@
diag 'check change of Due date when SLA for a ticket is changed';
{
- %RT::SLA = (
+ %RT::ServiceAgreements = (
Default => '2',
Levels => {
'2' => { Resolve => { RealMinutes => 60*2 } },
@@ -48,7 +48,7 @@
diag 'when not requestor creates a ticket, we dont set due date';
{
- %RT::SLA = (
+ %RT::ServiceAgreements = (
Default => '2',
Levels => {
'2' => { Response => { RealMinutes => 60*2 } },
@@ -71,7 +71,7 @@
diag 'check that reply to requestors unset due date';
{
- %RT::SLA = (
+ %RT::ServiceAgreements = (
Default => '2',
Levels => {
'2' => { Response => { RealMinutes => 60*2 } },
@@ -169,7 +169,7 @@
diag 'check that replies dont affect resolve deadlines';
{
- %RT::SLA = (
+ %RT::ServiceAgreements = (
Default => '2',
Levels => {
'2' => { Resolve => { RealMinutes => 60*2 } },
@@ -233,7 +233,7 @@
diag 'check that owner is not treated as requestor';
{
- %RT::SLA = (
+ %RT::ServiceAgreements = (
Default => '2',
Levels => {
'2' => { Response => { RealMinutes => 60*2 } },
@@ -266,7 +266,7 @@
diag 'check that response deadline is left alone when there is no requestor';
{
- %RT::SLA = (
+ %RT::ServiceAgreements = (
Default => '2',
Levels => {
'2' => { Response => { RealMinutes => 60*2 } },
Modified: RT-Extension-SLA/t/queue.t
==============================================================================
--- RT-Extension-SLA/t/queue.t (original)
+++ RT-Extension-SLA/t/queue.t Wed Feb 13 23:28:18 2008
@@ -36,7 +36,7 @@
ok( $id, 'Created SLA Attribute for General' );
no warnings 'once';
- %RT::SLA = (
+ %RT::ServiceAgreements = (
Default => '2',
Levels => {
'2' => { Resolve => { RealMinutes => 60 * 2 } },
Modified: RT-Extension-SLA/t/starts.t
==============================================================================
--- RT-Extension-SLA/t/starts.t (original)
+++ RT-Extension-SLA/t/starts.t Wed Feb 13 23:28:18 2008
@@ -21,7 +21,7 @@
diag 'check Starts date';
{
- %RT::SLA = (
+ %RT::ServiceAgreements = (
Default => 'standard',
Levels => {
'standard' => {
@@ -64,7 +64,7 @@
diag 'check Starts date with StartImmediately enabled';
{
- %RT::SLA = (
+ %RT::ServiceAgreements = (
Default => 'start immediately',
Levels => {
'start immediately' => {
More information about the Bps-public-commit
mailing list