[Rt-commit] r5840 - in rt/branches/3.7-EXPERIMENTAL: .
lib/RT/Shredder/Plugin
ruz at bestpractical.com
ruz at bestpractical.com
Thu Aug 31 22:17:48 EDT 2006
Author: ruz
Date: Thu Aug 31 22:17:47 2006
New Revision: 5840
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Plugin/SQLDump.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Plugin/Summary.pm
Log:
r3682 at cubic-pc: cubic | 2006-09-01 06:26:47 +0400
* minor shredder update
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder.pm Thu Aug 31 22:17:47 2006
@@ -142,6 +142,9 @@
=head3 Init( %options )
Sets shredder defaults, loads RT config and init RT interface.
+Defaults could later be overriden by object constructor and
+if you allready loaded config and initalized RT then you may
+skip this function call.
B<NOTE> that this is function and must be called with C<RT::Shredder::Init();>.
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Plugin/SQLDump.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Plugin/SQLDump.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Plugin/SQLDump.pm Thu Aug 31 22:17:47 2006
@@ -4,6 +4,7 @@
use warnings;
use base qw(RT::Shredder::Plugin::Base::Dump);
+use RT::Shredder;
sub AppliesToStates { return 'after wiping dependencies' }
@@ -23,7 +24,7 @@
FromStorage => delete $args{'from_storage'},
);
open $args{'file_handle'}, ">:raw", $file
- or die "Couldn't open '$file' for write: $!";
+ or return (0, "Couldn't open '$file' for write: $!");
return $self->SUPER::TestArgs( %args );
}
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Plugin/Summary.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Plugin/Summary.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Plugin/Summary.pm Thu Aug 31 22:17:47 2006
@@ -43,6 +43,22 @@
}
# TODO: cover other objects
+# ACE.pm
+# Attachment.pm
+# CustomField.pm
+# CustomFieldValue.pm
+# GroupMember.pm
+# Group.pm
+# Link.pm
+# ObjectCustomFieldValue.pm
+# Principal.pm
+# Queue.pm
+# Ticket.pm
+# User.pm
+
+# ScripAction.pm - works fine with defaults
+# ScripCondition.pm - works fine with defaults
+# Template.pm - works fine with defaults
sub WriteDownCachedGroupMember { return 1 }
sub WriteDownPrincipal { return 1 }
@@ -72,6 +88,18 @@
return $self->_WriteDownHash( $args{'Object'}, $props );
}
+sub WriteDownScrip {
+ my $self = shift;
+ my %args = ( Object => undef, @_ );
+ my $props = $self->_MakeHash( $args{'Object'} );
+ $props->{'Action'} = $args{'Object'}->ActionObj->Name;
+ $props->{'Condition'} = $args{'Object'}->ConditionObj->Name;
+ $props->{'Template'} = $args{'Object'}->TemplateObj->Name;
+ $props->{'Queue'} = $args{'Object'}->QueueObj->Name || 'global';
+
+ return $self->_WriteDownHash( $args{'Object'}, $props );
+}
+
sub _MakeHash {
my ($self, $obj) = @_;
my $hash = $self->__MakeHash( $obj );
More information about the Rt-commit
mailing list