[Bps-public-commit] r9432 - RT-Extension-SLA/lib/RT/Extension

ruz at bestpractical.com ruz at bestpractical.com
Wed Oct 24 10:36:12 EDT 2007


Author: ruz
Date: Wed Oct 24 10:36:08 2007
New Revision: 9432

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

Log:
* add GetDefaultServiceLevel method

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 Oct 24 10:36:08 2007
@@ -117,6 +117,21 @@
     return $args{'Ticket'}->QueueObj->CustomField( $args{'CustomField'} );
 }
 
+sub GetDefaultServiceLevel {
+    my $self = shift;
+    my %args = (Ticket => undef, Queue => undef, @_);
+    unless ( $args{'Queue'} || $args{'Ticket'} ) {
+        $args{'Ticket'} = $self->TicketObj if $self->can('TicketObj');
+    }
+    if ( !$args{'Queue'} && $args{'Ticket'} ) {
+        $args{'Queue'} = $args{'Ticket'}->QueueObj;
+    }
+    if ( $args{'Queue'} ) {
+        # TODO: here we should implement per queue defaults
+    }
+    return $RT::SLA{'Default'};
+}
+
 =head1 DESIGN
 
 =head2 Classes



More information about the Bps-public-commit mailing list