[Rt-commit] rt branch, 4.4/sla-upgrade-dates, updated. rt-4.4.0-112-g6ff3134
Jim Brandt
jbrandt at bestpractical.com
Tue May 17 10:55:05 EDT 2016
The branch, 4.4/sla-upgrade-dates has been updated
via 6ff31343b8c199d6bb2aee0de3f4edd330df825d (commit)
via 6d99bf7951c0f025415f877a637cf9d977b9c9da (commit)
via fd40febd3e805820004897db1877716c3db6b07e (commit)
from 11db86c3edb7cfcf0de9ae98133c70ffb61801ae (commit)
Summary of changes:
etc/upgrade/upgrade-sla.in | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit fd40febd3e805820004897db1877716c3db6b07e
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Tue May 17 10:36:57 2016 -0400
Add additional output to give feedback while running
If run with no arguments, Init sets the log level to
warning, so the user won't see any of the info messages
that display what the script is doing. Add a start and
end print to send something to the terminal.
Also add a log line for the ticket update step.
diff --git a/etc/upgrade/upgrade-sla.in b/etc/upgrade/upgrade-sla.in
index d88ed92..91649be 100644
--- a/etc/upgrade/upgrade-sla.in
+++ b/etc/upgrade/upgrade-sla.in
@@ -56,7 +56,9 @@ use lib "@RT_LIB_PATH@";
use RT::Interface::CLI qw(Init);
Init();
+print "Starting SLA upgrade process...\n";
{
+ RT->Logger->info("Updating tickets with SLA custom field");
local *RT::Ticket::_SetLastUpdated = sub {
return (1, "Migrating SLA from CF to core field silently");
};
@@ -160,3 +162,4 @@ for my $item ( @old_actions ) {
}
}
}
+print "\nDone.\n";
commit 6d99bf7951c0f025415f877a637cf9d977b9c9da
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Tue May 17 10:46:40 2016 -0400
Add some POD for upgrade-sla
diff --git a/etc/upgrade/upgrade-sla.in b/etc/upgrade/upgrade-sla.in
index 91649be..ee1dfb9 100644
--- a/etc/upgrade/upgrade-sla.in
+++ b/etc/upgrade/upgrade-sla.in
@@ -163,3 +163,23 @@ for my $item ( @old_actions ) {
}
}
print "\nDone.\n";
+
+__END__
+
+=head1 NAME
+
+upgrade-sla - upgrade SLA extension installs to core SLA feature
+
+=head1 SYNOPSIS
+
+ # Run upgrade after upgrading RT to 4.4.x
+ upgrade-sla
+ upgrade-sla --verbose # see more output while running the upgrade
+
+=head1 DESCRIPTION
+
+This upgrade script examines data from RTs that previously used C<RT::Extension::SLA>
+and migrates the data to the configuration required for core SLA functionality.
+This includes moving SLA values from the SLA custom field to the core RT field
+and enabling the SLA feature for queues that appear to have it configured.
+Some old scrips, actions, and conditions are also cleaned up.
commit 6ff31343b8c199d6bb2aee0de3f4edd330df825d
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Tue May 17 10:53:13 2016 -0400
Add queue name to output logs
Users don't generally know queues by the id. Names
are much easier to recognize.
diff --git a/etc/upgrade/upgrade-sla.in b/etc/upgrade/upgrade-sla.in
index ee1dfb9..4b71e3c 100644
--- a/etc/upgrade/upgrade-sla.in
+++ b/etc/upgrade/upgrade-sla.in
@@ -91,19 +91,19 @@ while ( my $queue = $queues->Next ) {
$cfs_to_disable{$cf->id} ||= $cf;
my ($ret, $msg) = $queue->SetSLADisabled(0);
if ( $ret ) {
- RT->Logger->info("Enabled SLA for queue #" . $queue->id);
+ RT->Logger->info("Enabled SLA for queue #" . $queue->id . ", " . $queue->Name);
}
else {
- RT->Logger->error("Failed to enable SLA for queue #" . $queue->id . ": $msg");
+ RT->Logger->error("Failed to enable SLA for queue #" . $queue->id . ", " . $queue->Name . ": $msg");
}
}
elsif ( !$queue->SLADisabled ) {
my ($ret, $msg) = $queue->SetSLADisabled(1);
if ( $ret ) {
- RT->Logger->info("Disabled SLA for queue #" . $queue->id . " because it doesn't have custom field SLA applied");
+ RT->Logger->info("Disabled SLA for queue #" . $queue->id . ", " . $queue->Name . ", because it doesn't have custom field SLA applied");
}
else {
- RT->Logger->error("Failed to disable SLA for queue #" . $queue->id . ": $msg");
+ RT->Logger->error("Failed to disable SLA for queue #" . $queue->id . ", " . $queue->Name . ": $msg");
}
}
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list