diff options
Diffstat (limited to 'rt/sbin')
-rw-r--r-- | rt/sbin/rt-attributes-viewer.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-clean-sessions.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-dump-metadata.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-email-dashboards.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-email-digest.in | 2 | ||||
-rwxr-xr-x | rt/sbin/rt-email-group-admin.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-fulltext-indexer.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-importer.in | 28 | ||||
-rw-r--r-- | rt/sbin/rt-preferences-viewer.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-serializer.in | 64 | ||||
-rw-r--r-- | rt/sbin/rt-server.fcgi.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-server.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-setup-database.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-setup-fulltext-index.in | 2 | ||||
-rwxr-xr-x | rt/sbin/rt-shredder.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-test-dependencies.in | 7 | ||||
-rw-r--r-- | rt/sbin/rt-validate-aliases.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-validator.in | 2 | ||||
-rw-r--r-- | rt/sbin/standalone_httpd.in | 2 |
19 files changed, 105 insertions, 26 deletions
diff --git a/rt/sbin/rt-attributes-viewer.in b/rt/sbin/rt-attributes-viewer.in index d6e3de4..97e1f12 100644 --- a/rt/sbin/rt-attributes-viewer.in +++ b/rt/sbin/rt-attributes-viewer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-clean-sessions.in b/rt/sbin/rt-clean-sessions.in index bdfd312..8490f06 100644 --- a/rt/sbin/rt-clean-sessions.in +++ b/rt/sbin/rt-clean-sessions.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-dump-metadata.in b/rt/sbin/rt-dump-metadata.in index c212749..fe5a831 100644 --- a/rt/sbin/rt-dump-metadata.in +++ b/rt/sbin/rt-dump-metadata.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-email-dashboards.in b/rt/sbin/rt-email-dashboards.in index e828002..336dc0c 100644 --- a/rt/sbin/rt-email-dashboards.in +++ b/rt/sbin/rt-email-dashboards.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-email-digest.in b/rt/sbin/rt-email-digest.in index 52fa450..276e407 100644 --- a/rt/sbin/rt-email-digest.in +++ b/rt/sbin/rt-email-digest.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-email-group-admin.in b/rt/sbin/rt-email-group-admin.in index e50865c..baf8c5a 100755 --- a/rt/sbin/rt-email-group-admin.in +++ b/rt/sbin/rt-email-group-admin.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-fulltext-indexer.in b/rt/sbin/rt-fulltext-indexer.in index ceffc97..53dc3fd 100644 --- a/rt/sbin/rt-fulltext-indexer.in +++ b/rt/sbin/rt-fulltext-indexer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-importer.in b/rt/sbin/rt-importer.in index 6d3cda5..7c957ec 100644 --- a/rt/sbin/rt-importer.in +++ b/rt/sbin/rt-importer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -95,6 +95,7 @@ GetOptions( "resume!", "originalid|i=s", + "exclude-organization", "ask", "ignore-errors", @@ -142,11 +143,12 @@ elsif ($OPT{'ignore-errors'}) { } my $import = RT::Migrate::Importer::File->new( - Directory => $dir, - OriginalId => $OPT{originalid}, - DumpObjects => $OPT{dump}, - Resume => $OPT{resume}, - HandleError => $error_handler, + Directory => $dir, + OriginalId => $OPT{originalid}, + ExcludeOrganization => $OPT{'exclude-organization'}, + DumpObjects => $OPT{dump}, + Resume => $OPT{resume}, + HandleError => $error_handler, ); if ($import->Metadata and -t STDOUT and not $OPT{quiet}) { @@ -222,6 +224,14 @@ current database; this may include users, queues, and tickets. It is possible to stop the import process with ^C; it can be later resumed by re-running the importer. +Certain records (notably queues and groups) will have their original +Organization name prepended to them on import. This is primarily to avoid +duplicate names (for example importing a General queue into an RT that +already has one would otherwise cause a name collision error). If you are +confident you won't have any name collisions in queues or groups, you may +suppress this behavior by passing the B<--exclude-organization> flag to +C<rt-importer>. + =head2 OPTIONS =over @@ -236,6 +246,12 @@ Places the original ticket organization and ID into a global custom field with the given name. If no global ticket custom field with that name is found in the current database, it will create one. +=item B<--exclude-organization> + +Ordinarily certain records (groups, queues, the B<--originalid> custom field) +include the organization name of the original RT instance. Use this option to +suppress that behavior and use the original name directly. + =item B<--ask> Prompt for action when an error occurs inserting a record into the diff --git a/rt/sbin/rt-preferences-viewer.in b/rt/sbin/rt-preferences-viewer.in index b06a2bf..4fc6e6d 100644 --- a/rt/sbin/rt-preferences-viewer.in +++ b/rt/sbin/rt-preferences-viewer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-serializer.in b/rt/sbin/rt-serializer.in index c008e78..c9aa484 100644 --- a/rt/sbin/rt-serializer.in +++ b/rt/sbin/rt-serializer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -104,6 +104,9 @@ GetOptions( "scrips!", "tickets!", "acls!", + "limit-queues=s@", + "limit-cfs=s@", + "hyperlink-unmigrated!", "clone", "incremental", @@ -127,12 +130,53 @@ $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{HyperlinkUnmigrated} = $OPT{'hyperlink-unmigrated'} if defined $OPT{'hyperlink-unmigrated'}; + $args{Clone} = $OPT{clone} if $OPT{clone}; $args{Incremental} = $OPT{incremental} if $OPT{incremental}; $args{GC} = defined $OPT{gc} ? $OPT{gc} : 5000; $args{Page} = defined $OPT{page} ? $OPT{page} : 100; +if ($OPT{'limit-queues'}) { + my @queue_ids; + + for my $name (split ',', join ',', @{ $OPT{'limit-queues'} }) { + $name =~ s/^\s+//; $name =~ s/\s+$//; + my $queue = RT::Queue->new(RT->SystemUser); + $queue->Load($name); + if (!$queue->Id) { + die "Unable to load queue '$name'"; + } + push @queue_ids, $queue->Id; + } + + $args{Queues} = \@queue_ids; +} + +if ($OPT{'limit-cfs'}) { + my @cf_ids; + + for my $name (split ',', join ',', @{ $OPT{'limit-cfs'} }) { + $name =~ s/^\s+//; $name =~ s/\s+$//; + + # numeric means id + if ($name =~ /^\d+$/) { + push @cf_ids, $name; + } + else { + my $cfs = RT::CustomFields->new(RT->SystemUser); + $cfs->Limit(FIELD => 'Name', VALUE => $name); + if (!$cfs->Count) { + die "Unable to load any custom field named '$name'"; + } + push @cf_ids, map { $_->Id } @{ $cfs->ItemsArrayRef }; + } + } + + $args{CustomFields} = \@cf_ids; +} + if (($OPT{clone} or $OPT{incremental}) and grep { /^(users|groups|deleted|scrips|tickets|acls)$/ } keys %OPT) { die "You cannot specify object types when cloning.\n\nPlease see $0 --help.\n"; @@ -321,6 +365,24 @@ serialized. Skip serialization of all ticket data. +=item B<--limit-queues> + +Takes a list of queue IDs or names separated by commas. When provided, only +that set of queues (and the tickets in them) will be serialized. + +=item B<--limit-cfs> + +Takes a list of custom field IDs or names separated by commas. When provided, +only that set of custom fields will be serialized. + +=item B<--hyperlink-unmigrated> + +Replace links to local records which are not being migrated with hyperlinks. +The hyperlinks will use the serializing RT's configured URL. + +Without this option, such links are instead dropped, and transactions which +had updated such links will be replaced with an explanatory message. + =item B<--clone> Serializes your entire database, creating a clone. This option should diff --git a/rt/sbin/rt-server.fcgi.in b/rt/sbin/rt-server.fcgi.in index fb4aed9..5b9fecd 100644 --- a/rt/sbin/rt-server.fcgi.in +++ b/rt/sbin/rt-server.fcgi.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-server.in b/rt/sbin/rt-server.in index fb4aed9..5b9fecd 100644 --- a/rt/sbin/rt-server.in +++ b/rt/sbin/rt-server.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-setup-database.in b/rt/sbin/rt-setup-database.in index 9d5a16d..c4bb384 100644 --- a/rt/sbin/rt-setup-database.in +++ b/rt/sbin/rt-setup-database.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-setup-fulltext-index.in b/rt/sbin/rt-setup-fulltext-index.in index 01b0cb8..616cf40 100644 --- a/rt/sbin/rt-setup-fulltext-index.in +++ b/rt/sbin/rt-setup-fulltext-index.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-shredder.in b/rt/sbin/rt-shredder.in index c3f2aa8..911450f 100755 --- a/rt/sbin/rt-shredder.in +++ b/rt/sbin/rt-shredder.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-test-dependencies.in b/rt/sbin/rt-test-dependencies.in index 144dc8b..610cc5c 100644 --- a/rt/sbin/rt-test-dependencies.in +++ b/rt/sbin/rt-test-dependencies.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -209,7 +209,7 @@ Devel::StackTrace 1.19 Digest::base Digest::MD5 2.27 Digest::SHA -Email::Address 1.897 +Email::Address 1.908 Email::Address::List 0.02 Encode Errno @@ -378,7 +378,8 @@ Pod::Simple 3.24 my %AVOID = ( 'DBD::Oracle' => [qw(1.23)], 'Devel::StackTrace' => [qw(1.28 1.29)], - 'DateTime::Locale' => [qw(1.00 1.01)] + 'DateTime::Locale' => [qw(1.00 1.01)], + 'DBD::mysql' => [qw(4.042)], ); if ($args{'download'}) { diff --git a/rt/sbin/rt-validate-aliases.in b/rt/sbin/rt-validate-aliases.in index a7ff4b3..ff57cd4 100644 --- a/rt/sbin/rt-validate-aliases.in +++ b/rt/sbin/rt-validate-aliases.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-validator.in b/rt/sbin/rt-validator.in index 2a62a6f..2ce2930 100644 --- a/rt/sbin/rt-validator.in +++ b/rt/sbin/rt-validator.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/standalone_httpd.in b/rt/sbin/standalone_httpd.in index fb4aed9..5b9fecd 100644 --- a/rt/sbin/standalone_httpd.in +++ b/rt/sbin/standalone_httpd.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) |