[Rt-commit] rt branch, 4.4/serialize-json-initialdata, updated. rt-4.4.1-324-g9d3282f
Shawn Moore
shawn at bestpractical.com
Tue Mar 14 15:43:48 EDT 2017
The branch, 4.4/serialize-json-initialdata has been updated
via 9d3282fa88a17b217d044dfc6321202f5b96691e (commit)
from c3ba1a4c872fcb6787cc7450a08a1d8f5652edd6 (commit)
Summary of changes:
lib/RT/Migrate/Serializer.pm | 4 ++++
sbin/rt-serializer.in | 14 ++++++++++----
2 files changed, 14 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 9d3282fa88a17b217d044dfc6321202f5b96691e
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Tue Mar 14 19:43:33 2017 +0000
Add --no-transactions flag to rt-serializer
diff --git a/lib/RT/Migrate/Serializer.pm b/lib/RT/Migrate/Serializer.pm
index db1440c..26d5ed3 100644
--- a/lib/RT/Migrate/Serializer.pm
+++ b/lib/RT/Migrate/Serializer.pm
@@ -68,6 +68,7 @@ sub Init {
FollowScrips => 0,
FollowTickets => 1,
+ FollowTransactions => 1,
FollowACL => 0,
Clone => 0,
@@ -86,6 +87,7 @@ sub Init {
FollowDeleted
FollowScrips
FollowTickets
+ FollowTransactions
FollowACL
Clone
Incremental
@@ -399,6 +401,8 @@ sub Observe {
return $self->{FollowTickets};
} elsif ($obj->isa("RT::ACE")) {
return $self->{FollowACL};
+ } elsif ($obj->isa("RT::Transaction")) {
+ return $self->{FollowTransactions};
} elsif ($obj->isa("RT::Scrip") or $obj->isa("RT::Template") or $obj->isa("RT::ObjectScrip")) {
return $self->{FollowScrips};
} elsif ($obj->isa("RT::GroupMember")) {
diff --git a/sbin/rt-serializer.in b/sbin/rt-serializer.in
index 29c1ca2..d1b75f5 100644
--- a/sbin/rt-serializer.in
+++ b/sbin/rt-serializer.in
@@ -104,6 +104,7 @@ GetOptions(
"scrips!",
"tickets!",
+ "transactions!",
"acls!",
"clone",
@@ -124,9 +125,10 @@ $args{AllUsers} = $OPT{users} if defined $OPT{users};
$args{AllGroups} = $OPT{groups} if defined $OPT{groups};
$args{FollowDeleted} = $OPT{deleted} if defined $OPT{deleted};
-$args{FollowScrips} = $OPT{scrips} if defined $OPT{scrips};
-$args{FollowTickets} = $OPT{tickets} if defined $OPT{tickets};
-$args{FollowACL} = $OPT{acls} if defined $OPT{acls};
+$args{FollowScrips} = $OPT{scrips} if defined $OPT{scrips};
+$args{FollowTickets} = $OPT{tickets} if defined $OPT{tickets};
+$args{FollowTransactions} = $OPT{transactions} if defined $OPT{transactions};
+$args{FollowACL} = $OPT{acls} if defined $OPT{acls};
$args{Clone} = $OPT{clone} if $OPT{clone};
$args{Incremental} = $OPT{incremental} if $OPT{incremental};
@@ -135,7 +137,7 @@ $args{GC} = defined $OPT{gc} ? $OPT{gc} : 5000;
$args{Page} = defined $OPT{page} ? $OPT{page} : 100;
if (($OPT{clone} or $OPT{incremental})
- and grep { /^(users|groups|deleted|scrips|tickets|acls)$/ } keys %OPT) {
+ and grep { /^(users|groups|deleted|scrips|tickets|transactions|acls)$/ } keys %OPT) {
die "You cannot specify object types when cloning.\n\nPlease see $0 --help.\n";
}
@@ -332,6 +334,10 @@ serialized.
Skip serialization of all ticket data.
+=item B<--no-transactions>
+
+Skip serialization of all transactions on any records (not just tickets).
+
=item B<--clone>
Serializes your entire database, creating a clone. This option should
-----------------------------------------------------------------------
More information about the rt-commit
mailing list