X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fsbin%2Frt-importer.in;fp=rt%2Fsbin%2Frt-importer.in;h=7c957ec182dd78d7ae9973760e297415deab8916;hp=6d3cda5eaf56b68b8788e0bd746cbb613c17c1c0;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=b226bc6bd81f999176cdbfa53a799033ff0a0307 diff --git a/rt/sbin/rt-importer.in b/rt/sbin/rt-importer.in index 6d3cda5ea..7c957ec18 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 # # # (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