X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fsbin%2Frt-importer.in;h=e3bed7d52fa1771b90a756f311305605a3b19236;hp=8b5bd3230882acc4ccbc65e276d7c7e4f3b345c2;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hpb=1c538bfabc2cd31f27067505f0c3d1a46cba6ef0 diff --git a/rt/sbin/rt-importer.in b/rt/sbin/rt-importer.in index 8b5bd3230..e3bed7d52 100644 --- a/rt/sbin/rt-importer.in +++ b/rt/sbin/rt-importer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC # # # (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. + =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