[Bps-public-commit] r9453 - in RT-Extension-SLA: etc

ruz at bestpractical.com ruz at bestpractical.com
Thu Oct 25 01:46:26 EDT 2007


Author: ruz
Date: Thu Oct 25 01:46:25 2007
New Revision: 9453

Modified:
   RT-Extension-SLA/etc/initialdata
   RT-Extension-SLA/lib/RT/Condition/SLA_RequireDueSet.pm

Log:
* run DueSet script on Correspond, but only service level is set

Modified: RT-Extension-SLA/etc/initialdata
==============================================================================
--- RT-Extension-SLA/etc/initialdata	(original)
+++ RT-Extension-SLA/etc/initialdata	Thu Oct 25 01:46:25 2007
@@ -22,7 +22,7 @@
     },
     {  Name        => '[SLA] Require Due set', # loc
        Description => 'Detect a situation when we should set Due date' , # loc
-       ApplicableTransTypes => 'Create,CustomField',
+       ApplicableTransTypes => 'Create,CustomField,Correspond',
        ExecModule => 'SLA_RequireDueSet',
     },
 );

Modified: RT-Extension-SLA/lib/RT/Condition/SLA_RequireDueSet.pm
==============================================================================
--- RT-Extension-SLA/lib/RT/Condition/SLA_RequireDueSet.pm	(original)
+++ RT-Extension-SLA/lib/RT/Condition/SLA_RequireDueSet.pm	Thu Oct 25 01:46:25 2007
@@ -20,8 +20,10 @@
     my $self = shift;
     return 0 unless $self->SLAIsApplied;
 
-    if ( $self->TransactionObj->Type eq 'Create' ) {
+    my $type = $self->TransactionObj->Type;
+    if ( $type eq 'Create' || $type eq 'Correspond' ) {
         return 1 if $self->TicketObj->FirstCustomFieldValue('SLA');
+        return 0;
     }
     return 1 if $self->IsCustomFieldChange('SLA');
     return 0;



More information about the Bps-public-commit mailing list