[Rt-commit] rt branch, 4.4/sla, repushed

? sunnavy sunnavy at bestpractical.com
Tue Aug 11 15:20:16 EDT 2015


The branch 4.4/sla was deleted and repushed:
       was 8bfb984257cd45a4ef9811a4ba10607b4e3b570a
       now 3c183d37ad686ddc377bcff41c2511a956fea9a0

1:  c0b308e ! 1:  7e14558 import sla extension
    @@ -1624,8 +1624,8 @@
     +    }
     +    if ( $args{'Queue'} ) {
     +        return $args{'Queue'}->SLA if $args{'Queue'}->SLA;
    -+
    -+        if ( my $info = $RT::ServiceAgreements{'QueueDefault'}{ $args{'Queue'}->Name } ) {
    ++        if ( $RT::ServiceAgreements{'QueueDefault'} &&
    ++            ( my $info = $RT::ServiceAgreements{'QueueDefault'}{ $args{'Queue'}->Name } )) {
     +            return $info unless ref $info;
     +            return $info->{'Level'} || $RT::ServiceAgreements{'Default'};
     +        }
    @@ -1637,3 +1637,15 @@
     +
     +1;
     
    +diff --git a/sbin/rt-test-dependencies.in b/sbin/rt-test-dependencies.in
    +--- a/sbin/rt-test-dependencies.in
    ++++ b/sbin/rt-test-dependencies.in
    +@@
    + 
    + $deps{'CORE'} = [ text_to_hash( << '.') ];
    + Apache::Session 1.53
    ++Business::Hours
    + CGI 3.38
    + CGI::Cookie 1.20
    + CGI::Emulate::PSGI
    +
2:  25a0ac4 ! 2:  ba8b312 use SLA column in Tickets table instead of a custom field
    @@ -1,6 +1,6 @@
     Author: sunnavy <sunnavy at bestpractical.com>
     
    -    use SLA column in Tickets table instead
    +    use SLA column in Tickets table instead of a custom field
     
     diff --git a/etc/initialdata b/etc/initialdata
     --- a/etc/initialdata
    @@ -23,6 +23,21 @@
      @Queues = ({ Name              => 'General',
                   Description       => 'The default queue',
                   CorrespondAddress => "",
    +@@
    +     },
    +     {  Name        => '[SLA] Require Starts set', # loc
    +        Description => 'Detect a situation when we should set Starts date' , # loc
    +-       ApplicableTransTypes => 'Create,CustomField',
    ++       ApplicableTransTypes => 'Create,Set',
    +        ExecModule => 'SLA_RequireStartsSet',
    +     },
    +     {  Name        => '[SLA] Require Due set', # loc
    +        Description => 'Detect a situation when we should set Due date' , # loc
    +-       ApplicableTransTypes => 'Create,CustomField,Correspond,Set,Status',
    ++       ApplicableTransTypes => 'Create,Correspond,Set,Status',
    +        ExecModule => 'SLA_RequireDueSet',
    +     },
    + 
     
     diff --git a/etc/schema.Oracle b/etc/schema.Oracle
     --- a/etc/schema.Oracle
3:  6e30149 = 3:  231fe16 allow to disable SLA for some queues
-:  ------- > 4:  404ba02 set default SLA in ticket create stage directly
4:  f1cd8c1 ! 5:  87aaf48 update doc/config and move it to RT_Config.pm
    @@ -15,9 +15,6 @@
     +
     +=item C<%ServiceAgreements>
     +
    -+There is no WebUI in the current version. Almost everything is controlled in
    -+the C<%ServiceAgreements> and C<%ServiceBusinessHours>. For example:
    -+
     +    Set( %ServiceAgreements = (
     +        Default => '4h',
     +        QueueDefault => {
    @@ -199,13 +196,13 @@
     +        KeepInLoop => { RealMinutes => 60*2 }, # two hours
     +        Resolve    => { RealMinutes => 60*24 }, # 24 real hours
     +    },
    - 
    ++
     +In the above example Due is set to one hour after creation, reply
     +of a inside actor moves Due date two hours forward, outside actors'
     +replies move Due date to one hour and resolve deadine is 24 hours.
      
     +=item Modifying Agreements
    -+
    + 
     +=over 4
     +
     +=item OutOfHours (struct, no default)
5:  8be9a47 ! 6:  4439388 upgrade-sla script to migrate old data used in SLA extension
    @@ -1,6 +1,6 @@
     Author: sunnavy <sunnavy at bestpractical.com>
     
    -    upgrade-sla script to migrate SLA values from custom fields
    +    upgrade-sla script to migrate old data used in SLA extension
     
     diff --git a/.gitignore b/.gitignore
     --- a/.gitignore
    @@ -110,7 +110,10 @@
     +    }
     +    elsif ( !$queue->SLADisabled ) {
     +        my ($ret, $msg) = $queue->SetSLADisabled(1);
    -+        unless ( $ret ) {
    ++        if ( $ret ) {
    ++            RT->Logger->info("Disabled SLA for queue #" . $queue->id . " because it doesn't have custom field SLA applied");
    ++        }
    ++        else {
     +            RT->Logger->error("Failed to disable SLA for queue #" . $queue->id . ": $msg");
     +        }
     +    }
    @@ -118,8 +121,47 @@
     +
     +for my $cf ( values %cfs_to_disable ) {
     +    my ($ret, $msg) = $cf->SetDisabled(1);
    -+    unless ( $ret ) {
    ++    if ( $ret ) {
    ++        RT->Logger->info("Disabled custom field SLA #" . $cf->id);
    ++    }
    ++    else {
     +        RT->Logger->error("Failed to disable custom field SLA #" . $cf->id . ": $msg");
     +    }
     +}
    ++
    ++my $scrip = RT::Scrip->new(RT->SystemUser);
    ++$scrip->LoadByCols( Description => '[SLA] Set default service level if needed' );
    ++if ( $scrip->id ) {
    ++    my ($ret, $msg) = $scrip->RT::Record::Delete();
    ++    if ( $ret ) {
    ++        RT->Logger->info(qq{Deleted scrip "[SLA] Set default service level if needed"});
    ++    }
    ++    else {
    ++        RT->Logger->error(qq{Failed to delete scrip "[SLA] Set default service level if needed": $msg});
    ++    }
    ++}
    ++
    ++my $condition = RT::ScripCondition->new(RT->SystemUser);
    ++$condition->Load('[SLA] Require default');
    ++if ( $condition->id ) {
    ++    my ($ret, $msg) = $condition->RT::Record::Delete();
    ++    if ( $ret ) {
    ++        RT->Logger->info(qq{Deleted condition "[SLA] Require default"});
    ++    }
    ++    else {
    ++        RT->Logger->error(qq{Failed to delete condition "[SLA] Require default": $msg});
    ++    }
    ++}
    ++
    ++my $action = RT::ScripAction->new(RT->SystemUser);
    ++$action->Load('[SLA] Set default service level');
    ++if ( $action->id ) {
    ++    my ($ret, $msg) = $action->RT::Record::Delete();
    ++    if ( $ret ) {
    ++        RT->Logger->info(qq{Failed to delete action "[SLA] Set default service level"});
    ++    }
    ++    else {
    ++        RT->Logger->error(qq{Failed to delete action "[SLA] Set default service level": $msg});
    ++    }
    ++}
     
6:  6eaad04 ! 7:  446026e upgrading note for core SLA
    @@ -1,6 +1,6 @@
     Author: sunnavy <sunnavy at bestpractical.com>
     
    -    upgrading note for core sla
    +    upgrading note for core SLA
     
     diff --git a/docs/UPGRADING-4.4 b/docs/UPGRADING-4.4
     --- a/docs/UPGRADING-4.4
7:  8bfb984 < -:  ------- fix uninitialized warnings to make tests happy
-:  ------- > 8:  1ea15af warn if we still have SLA extension enabled
-:  ------- > 9:  3c183d3 SLA tests



More information about the rt-commit mailing list