[Rt-devel] Problems converting rt-2.0.15 to rt-3.0.9 using rt-2-to-rt3

David Schmidt dschmidt at noanet.net
Sun Jan 9 15:34:28 EST 2005


I am attempting to convert a database from rt-2-0-15 to rt-3-0-9 using
rt-2-to-rt3-1.23 and getting multiple errors.  We are running
mysql-max-4.1.7 under FreeBSD 4.10.

I'm new to RT and haven't worked with Perl in many years, so feel free
to correct any errors below.

The rt-2.0-to-dumpfile runs fine, but I'm getting errors when I run the
dumpfile-to-rt-3.0 script.  I am doing a "make dropdb" and "make
initialize-database" on the RT3 database before every run of
dumpfile-to-rt-3.0.

The first error was in importing users, and seems to have been caused by
"undef" values being sent to SearchBuilder.  Around line 222 I found the
following code:

    if ($args{'CryptedPassword'} ) {
        $args{'Password'} = $args{'CryptedPassword'};
        delete $args{'CryptedPassword'};
    }
    elsif ( !$args{'Password'} ) {
        $args{'Password'} = '*NO-PASSWORD*';
    }
    elsif ( length( $args{'Password'} ) < $RT::MinimumPasswordLength ) {
        return ( 0, $self->loc("Password too short") );
    }
    else {
        $args{'Password'} = $self->_GeneratePassword($args{'Password'});
    }

If CryptedPassword is undefined the first if will fail, setting Password
to "*NO-PASSWORD*", but NOT deleting the key for CryptedPassword.  I
changed this code to delete the CryptedPassword no matter which branch
is taken, and then to perform the following tests for password length.

    if ($args{'CryptedPassword'} ) {
        $args{'Password'} = $args{'CryptedPassword'};
    }
    elsif ( !$args{'Password'} ) {
        $args{'Password'} = '*NO-PASSWORD*';
    }
    delete $args{'CryptedPassword'};

This got the user names imported, but now I'm getting the following
errors after creating all the users:

Importing groups
gggrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrfqF
ailed to create queue for$VAR1 = {
          'LastUpdatedBy' => undef,
          'Creator' => undef
        };
Couldn't load principal  to grant them AdminKeywordSelects on queue 
$VAR1 = {
          'PrincipalType' => 'Group',
          'Role' => 'AdminCc',
          'Name' => 'AdminKeywordSelects'
        };
Couldn't load principal  to grant them AdminQueue on queue 
$VAR1 = {
          'PrincipalType' => 'Group',
          'Role' => 'AdminCc',
          'Name' => 'AdminQueue'
        };
Couldn't load principal  to grant them CommentOnTicket on queue

I was wondering if anyone else has had similar problems and come up with
a fix or updated rt-2-to-rt3?

Thank you,

David Schmidt
NOC Analyst
Northwest Open Access Network
1-866-662-6380
dschmidt at noanet.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://bestpractical.com/pipermail/rt-devel/attachments/20050109/8c93acf5/attachment-0001.htm


More information about the Rt-devel mailing list