Rt2-to-rt3 problem

Hi,

We use RT2 in production last 2.5 years on Linux and Solaris.
One of our installations has ~50K tickets in it. There were
some problems, but I’d say we are happy with what we have.

I’m trying to upgrade RT to 3.2.1. I’ve build a separate database
and started a new RT. The web interface works fine.
The problem is with rt2-to-rt3. Export went fine, no errors or warnings.
Import breakes something. dumpfile-to-rt-3.0 does not want to
create users with email addresses from our domain (others are OK):


.uCreating user somebody@ncbi.nlm.nih.gov
.Failed to create user for$VAR1 = {
‘Comments’ => ‘Autocreated on ticket submission’,
‘RealName’ => ‘Name Lastname’,
‘Creator’ => ‘1’,
‘EmailAddress’ => ‘somebody@ncbi.nlm.nih.gov’,
‘LastUpdatedBy’ => ‘1’,
‘Created’ => ‘2003-02-28 22:11:26’,
‘Name’ => ‘somebody@ncbi.nlm.nih.gov’,
‘LastUpdated’ => ‘2003-02-28 22:11:26’
};

After that, when it imports tickets, there are errors with the same address:


.t-1684
Failed to create user ‘somebody@ncbi.nlm.nih.gov’: Email address in use
.t-8597

MySQL 4.0.17 on a separate Linux box,
Perl 5.8.5 and RT on a Solaris 8 machine.

Any help, thoughts would be grately appriciated.

Thanks
Andrey L Vovk
NCBI Systems Group
NIH Contractor


.t-1684
Failed to create user ‘somebody@ncbi.nlm.nih.gov’: Email address in use
.t-8597

You need to consolidate Your user information. email addresses must be
unique for all accounts in the RT user database.

Regards,
Harald

Thanks Harald,

I’ve found the culprit. The problem was caused by wrong parameters for
CanonicalizeEmailAddress in etc/RT_SiteConfig.pm:

Set($CanonicalizeEmailAddressMatch , ‘(.*).ncbi.nlm.nih.gov$’);
Set($CanonicalizeEmailAddressReplace , ‘ncbi.nlm.nih.gov’);

as the result all addresses @ncbi.nlm.nih.gov were replaced
by ‘ncbi.nlm.nih.gov’ after the very first one had been imported.

The correct form is something like:

Set($CanonicalizeEmailAddressMatch , ‘@(.*)ncbi.nlm.nih.gov$’);
Set($CanonicalizeEmailAddressReplace , ‘@ncbi.nlm.nih.gov’);

Here is a patch for dumpfile-to-rt-3.0, which should simplify
diagnosis for problems like mine:

*** dumpfile-to-rt-3.0 Thu Aug 5 14:39:43 2004
— dumpfile-to-rt-3.0-new Thu Aug 5 14:42:59 2004
*** 753,758 ****
— 753,759 ----

  unless ( $user_obj->Id ) {
      my ( $uid, $umsg ) = $user_obj->Create( %{$user} );
  •     print "\nError:" . $umsg ."\n" unless ($uid);
    }
    my $id = $user_obj->Id();
    print "Failed to create user for" . scalar Dumper $user unless ($id);On Thu, Aug 05, 2004 at 04:36:29PM +0200, Harald Wagener wrote:
    

Am 04.08.2004 um 18:14 schrieb Andrey Vovk:


.t-1684
Failed to create user ‘somebody@ncbi.nlm.nih.gov’: Email address in use
.t-8597

You need to consolidate Your user information. email addresses must be
unique for all accounts in the RT user database.

Regards,
Harald

Regards
Andrey L Vovk
NCBI Systems Group
NIH Contractor
Andrey L Vovk
NCBI Systems Group
NIH Contractor