[Rt-commit] rt branch 5.0/importer-dashboards updated. rt-5.0.3-128-g504379bef0

BPS Git Server git at git.bestpractical.com
Thu Oct 27 14:57:49 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".

The branch, 5.0/importer-dashboards has been updated
       via  504379bef0833f3c9628366473b2d020e5653889 (commit)
       via  84a7d508008992ff27b79bcc2c767e57b255e56f (commit)
      from  a83f4b0e7054f9a86f69b3ff9f9b7bb2a826abb2 (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 504379bef0833f3c9628366473b2d020e5653889
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sun Oct 23 02:37:42 2022 +0800

    Fix typo in DefaultDashboard handling of PostInflateFixup

diff --git a/lib/RT/Attribute.pm b/lib/RT/Attribute.pm
index 7a3489aef0..1681874b15 100644
--- a/lib/RT/Attribute.pm
+++ b/lib/RT/Attribute.pm
@@ -916,7 +916,7 @@ sub PostInflateFixup {
     elsif ( $self->Name =~ /DefaultDashboard$/ ) {
         my $content = $self->Content;
         if ( ref($content) eq 'SCALAR' ) {
-            my $attr = $importer->LookupObj($$_);
+            my $attr = $importer->LookupObj($$content);
             if ($attr) {
                 $content = $attr->Id;
             }

commit 84a7d508008992ff27b79bcc2c767e57b255e56f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sun Oct 23 03:07:23 2022 +0800

    No need to create transactions in PostInflateFixup

diff --git a/lib/RT/Attribute.pm b/lib/RT/Attribute.pm
index db2ee9fa51..7a3489aef0 100644
--- a/lib/RT/Attribute.pm
+++ b/lib/RT/Attribute.pm
@@ -315,7 +315,8 @@ sub SetContent {
             return(0, "Content couldn't be frozen");
         }
     }
-    my ($ok, $msg) = $self->_Set( Field => 'Content', Value => $content );
+    my ( $ok, $msg )
+        = $self->_Set( Field => 'Content', Value => $content, RecordTransaction => $args{RecordTransaction} );
     if ($ok) {
         $self->_SyncLinks if $args{SyncLinks};
         return ( $ok, $self->loc("Attribute updated") );
@@ -910,7 +911,7 @@ sub PostInflateFixup {
                 }
             }
         }
-        $self->SetContent( $content, SyncLinks => 0 );
+        $self->SetContent( $content, SyncLinks => 0, RecordTransaction => 0 );
     }
     elsif ( $self->Name =~ /DefaultDashboard$/ ) {
         my $content = $self->Content;
@@ -954,7 +955,7 @@ sub PostInflateFixup {
                 }
             }
         }
-        $self->SetContent( $content, SyncLinks => 0 );
+        $self->SetContent( $content, SyncLinks => 0, RecordTransaction => 0 );
     }
     elsif ($self->Name eq 'Subscription') {
         my $content = $self->Content;
@@ -971,7 +972,7 @@ sub PostInflateFixup {
                 );
             }
         }
-        $self->SetContent( $content, SyncLinks => 0 );
+        $self->SetContent( $content, SyncLinks => 0, RecordTransaction => 0 );
     }
 }
 

-----------------------------------------------------------------------

Summary of changes:
 lib/RT/Attribute.pm | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list