[Bps-public-commit] r8698 - rt2-to-rt3/trunk
falcone at bestpractical.com
falcone at bestpractical.com
Thu Aug 23 12:02:35 EDT 2007
Author: falcone
Date: Thu Aug 23 12:02:32 2007
New Revision: 8698
Modified:
rt2-to-rt3/trunk/ (props changed)
rt2-to-rt3/trunk/rt-2.0-to-dumpfile
Log:
r23998 at ketch: falcone | 2007-08-23 11:47:57 -0400
* add a "first" option to only dump the first X tickets (useful for testing)
Modified: rt2-to-rt3/trunk/rt-2.0-to-dumpfile
==============================================================================
--- rt2-to-rt3/trunk/rt-2.0-to-dumpfile (original)
+++ rt2-to-rt3/trunk/rt-2.0-to-dumpfile Thu Aug 23 12:02:32 2007
@@ -13,6 +13,7 @@
my $mode = ( shift || 'all' );
my $since = ( shift || undef );
+my $row_limit = ($mode eq 'first') ? $since : undef;
# Set to 0 to not bother exporting dead/deleted tickets.
my $export_dead = 1;
@@ -212,7 +213,7 @@
my $ds;
-if ( $mode =~ /^all$/i ) {
+if ( $mode =~ /^(?:all|first)$/i ) {
print STDERR "Exporting Groups\n";
my $Groups = RT::Groups->new($RT::SystemUser);
@@ -307,6 +308,8 @@
export_tickets();
}
else {
+ print STDERR "Doing a partial export since $since\n";
+ print STDERR "Exporting Users\n";
my @users = export_users($ds);
$ds->{'User'} = \@users;
@@ -331,6 +334,13 @@
OPERATOR => ">=",
VALUE => $since );
}
+
+ # limit to the first 50/100/etc tickets for testing
+ if ($mode eq 'first' && $row_limit) {
+ print STDERR "limiting to $row_limit tickets";
+ $tix->RowsPerPage($row_limit);
+ }
+
## XXX we could Limit on 'Status' '!=' 'dead' if $export_dead == 0,
## but then we'd not be able to say /why/ we're not exporting the
## ticket...
More information about the Bps-public-commit
mailing list