[Rt-commit] rt branch, 4.2/shredder-watcher-history, updated. rt-4.0.8-804-g5139663

Ruslan Zakirov ruz at bestpractical.com
Mon Dec 3 17:52:13 EST 2012


The branch, 4.2/shredder-watcher-history has been updated
       via  51396633fd51dc3aa0231b0d4927900d5823d7a7 (commit)
      from  4a2af22111aa35ab878c14501c0ed54821929f27 (commit)

Summary of changes:
 lib/RT/Shredder/Principal.pm | 8 ++++++++
 t/shredder/02group_member.t  | 5 +----
 2 files changed, 9 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 51396633fd51dc3aa0231b0d4927900d5823d7a7
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Dec 4 02:51:22 2012 +0400

    shred {Add,Del}Watcher transactions with Principal

diff --git a/lib/RT/Shredder/Principal.pm b/lib/RT/Shredder/Principal.pm
index d14c93d..b3913a0 100644
--- a/lib/RT/Shredder/Principal.pm
+++ b/lib/RT/Shredder/Principal.pm
@@ -85,6 +85,14 @@ sub __DependsOn
            );
     push( @$list, $objs );
 
+# AddWatcher/DelWatcher txns
+    foreach my $type ( qw(AddWatcher DelWatcher) ) {
+        my $objs = RT::Transactions->new( $self->CurrentUser );
+        $objs->Limit( FIELD => $type =~ /Add/? 'NewValue': 'OldValue', VALUE => $self->Id );
+        $objs->Limit( FIELD => 'Type', VALUE => $type );
+        push( @$list, $objs );
+    }
+
     $deps->_PushDependencies(
             BaseObject => $self,
             Flags => DEPENDS_ON,
diff --git a/t/shredder/02group_member.t b/t/shredder/02group_member.t
index 0208078..368fbe4 100644
--- a/t/shredder/02group_member.t
+++ b/t/shredder/02group_member.t
@@ -91,10 +91,7 @@ my $test = "RT::Test::Shredder";
 
 	$shredder->PutObjects( Objects => $user );
 	$shredder->WipeoutAll();
-      TODO: {
-            local $TODO = "AddWatcher/DelWatcher records not removed";
-            $test->db_is_valid;
-        }
+        $test->db_is_valid;
 }
 
 ### deleting member of the ticket Owner role group

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


More information about the Rt-commit mailing list