[Bps-public-commit] rt-extension-changemanagement branch master updated. ebbf8c9ba232fa6bd9494943ad3bd0668dd4fc02

BPS Git Server git at git.bestpractical.com
Fri May 13 12:49:07 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt-extension-changemanagement".

The branch, master has been updated
       via  ebbf8c9ba232fa6bd9494943ad3bd0668dd4fc02 (commit)
      from  c05dba37f4392171321f79451ba3e9aa7122a145 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ebbf8c9ba232fa6bd9494943ad3bd0668dd4fc02
Author: Jason Crome <jcrome at bestpractical.com>
Date:   Fri May 13 08:48:19 2022 -0400

    Fix upgrade script; create upgrade instructions

diff --git a/etc/upgrade/0.02/content b/etc/upgrade/0.02/content
index 39f5d46..ea33bdc 100644
--- a/etc/upgrade/0.02/content
+++ b/etc/upgrade/0.02/content
@@ -6,58 +6,19 @@ our @Final = (
         RT->Logger->debug("Converting attributes");
 
         my $attribute = RT::Attribute->new( RT->SystemUser );
-        $attribute->LoadByNameAndObject( Name => 'Changes Scheduled, Next 7 Days', Object => RT->SystemUser );
+        $attribute->LoadByNameAndObject( Name => 'Search - Changes Scheduled, Next 7 Days', Object => RT->System );
         my ($status, $msg) = $attribute->__Set( Field => 'Name', Value => 'SavedSearch' );
         RT->Logger->warning( "Couldn't change attribute $msg" ) unless $status;
         ($status, $msg) = $attribute->__Set( Field => 'Description', Value => 'Changes Scheduled, Next 7 Days' );
         RT->Logger->warning( "Couldn't change attribute $msg" ) unless $status;
 
         $attribute = RT::Attribute->new( RT->SystemUser );
-        $attribute->LoadByNameAndObject( Name => 'Changes Deployed, Last 30 Days', Object => RT->SystemUser );
+        $attribute->LoadByNameAndObject( Name => 'Search - Changes Deployed, Last 30 Days', Object => RT->System );
         ($status, $msg) = $attribute->__Set( Field => 'Name', Value => 'SavedSearch' );
         RT->Logger->warning( "Couldn't change attribute $msg" ) unless $status;
         ($status, $msg) = $attribute->__Set( Field => 'Description', Value => 'Changes Deployed, Last 30 Days' );
         RT->Logger->warning( "Couldn't change attribute $msg" ) unless $status;
     },
-    sub {
-        RT->Logger->debug("Converting dashboards");
-
-        my $dashboard = RT::Dashboard->new( RT->SystemUser );
-        $dashboard->LoadByNameAndObject( Name => 'ChangeManagement', Object => RT->SystemUser );
-
-        my @searches;
-        for my $search_desc ( 'Changes Scheduled, Next 7 Days', 'Changes Deployed, Last 30 Days' ) {
-            my $search = RT::Attribute->new( RT->SystemUser );
-            my ( $ret, $msg ) = $search->LoadByCols(
-                Name        => 'SavedSearch',
-                Description => $search_desc,
-            );
-            if ($search && $ret) {
-                push @searches,
-                    {
-                    pane         => 'body',
-                    portlet_type => 'search',
-                    id           => $search->Id,
-                    description  => "Saved Search: $search_desc",
-                    privacy      => join( '-', ref( RT->System ), RT->System->Id ),
-                    };
-                } else {
-                    RT->Logger->error( "Could not load saved search '$search_desc': $msg" );
-                }
-        }
-
-        my $panes = {
-            body => [
-                @searches,
-            ],
-        };
-
-        # fill content
-        my ( $ret, $msg ) = $dashboard->Update( Panes => $panes );
-        if ( !$ret ) {
-            RT->Logger->error("Couldn't update content for dashboard Change Management: $msg");
-        }
-    },
 );
 
 
diff --git a/lib/RT/Extension/ChangeManagement.pm b/lib/RT/Extension/ChangeManagement.pm
index a3229ce..1d9bf5f 100644
--- a/lib/RT/Extension/ChangeManagement.pm
+++ b/lib/RT/Extension/ChangeManagement.pm
@@ -43,6 +43,11 @@ you may end up with duplicate data in your database.
 
 =back
 
+=head1 UPGRADING
+
+To upgrade from an earlier version, see the instructions in the L<UPGRADING|UPGRADING.pod>
+document.
+
 =head1 DESCRIPTION
 
 This extension provides the configuration to implement a change management
-----------------------------------------------------------------------

Summary of changes:
 etc/upgrade/0.02/content             | 43 ++----------------------------------
 lib/RT/Extension/ChangeManagement.pm |  5 +++++
 2 files changed, 7 insertions(+), 41 deletions(-)


hooks/post-receive
-- 
rt-extension-changemanagement


More information about the Bps-public-commit mailing list