[Rt-commit] rt branch 5.0/serialize-set-watcher-txn created. rt-5.0.3-141-g8a51dc25cd

BPS Git Server git at git.bestpractical.com
Tue Oct 25 21:44:46 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/serialize-set-watcher-txn has been created
        at  8a51dc25cdace8ed81a26bf20f0aa15a7dbe6462 (commit)

- Log -----------------------------------------------------------------
commit 8a51dc25cdace8ed81a26bf20f0aa15a7dbe6462
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Oct 26 05:36:30 2022 +0800

    Serialize OldValue/NewValue to user references in SetWatcher/Set Owner txns
    
    They got unintentionally ignored previously.

diff --git a/lib/RT/Transaction.pm b/lib/RT/Transaction.pm
index 4f1286bf1b..c6fe56c951 100644
--- a/lib/RT/Transaction.pm
+++ b/lib/RT/Transaction.pm
@@ -2164,7 +2164,8 @@ sub Serialize {
 
         $store{OldReference} = \($self->OldReferenceObject->UID) if $self->OldReference;
         $store{NewReference} = \($self->NewReferenceObject->UID) if $self->NewReference;
-    } elsif ($type =~ /^(Take|Untake|Force|Steal|Give)$/) {
+    } elsif ($type =~ /^(Take|Untake|Force|Steal|Give|SetWatcher)$/
+            || ($type eq 'Set' && $store{Field} eq 'Owner')) {
         for my $field (qw/OldValue NewValue/) {
             my $user = RT::User->new( RT->SystemUser );
             $user->Load( $store{$field} );

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list