[Rt-commit] rt branch, 4.4/upgrade-sla-script-enable-sla, created. rt-4.4.0-53-gc5279ce
Dustin Graves
dustin at bestpractical.com
Fri Mar 4 19:06:52 EST 2016
The branch, 4.4/upgrade-sla-script-enable-sla has been created
at c5279ce1826b9f37f8a1b16cfb923dfa645539d4 (commit)
- Log -----------------------------------------------------------------
commit c5279ce1826b9f37f8a1b16cfb923dfa645539d4
Author: Dustin Graves <dustin at bestpractical.com>
Date: Fri Mar 4 23:59:04 2016 +0000
fix upgrade-sla script to enable SLA on queues with SLA custom field applied
Fixes: I#31703
diff --git a/etc/upgrade/upgrade-sla.in b/etc/upgrade/upgrade-sla.in
index da18d55..5e8635c 100644
--- a/etc/upgrade/upgrade-sla.in
+++ b/etc/upgrade/upgrade-sla.in
@@ -74,6 +74,13 @@ while ( my $queue = $queues->Next ) {
$cfs->Limit(FIELD => 'Name', VALUE => 'SLA', CASESENSITIVE => 0 );
if ( my $cf = $cfs->First ) {
$cfs_to_disable{$cf->id} ||= $cf;
+ my ($ret, $msg) = $queue->SetSLADisabled(0);
+ if ( $ret ) {
+ RT->Logger->info("Enabled SLA for queue #" . $queue->id);
+ }
+ else {
+ RT->Logger->error("Failed to enable SLA for queue #" . $queue->id . ": $msg");
+ }
}
elsif ( !$queue->SLADisabled ) {
my ($ret, $msg) = $queue->SetSLADisabled(1);
-----------------------------------------------------------------------
More information about the rt-commit
mailing list