Importing data from a legacy system

Hi,

Where can I find information about how to import ticket data, including
history, from a legacy system into RT? Using Google, I have found no useful
information. I also can not find any information about migration in the RT
Essentials book - are there any?

Reading the RT 3.6.0 source code and module documentation I found the
RT::ticket::Import method in Ticket_Overlay.pm which I guess can be used to
import the current ticket data. However, I have been unable to understand
how to import ticket history. The Create method in Transaction_Overlay.pm
looks like it could be used for migrating ticket history, but according the
documentation in Transaction_Overlay.pm, RT::Transaction::Create must not be
called directly - only by RT::Ticket. I have not found any useful method for
import ticket history in Ticket.pm or Ticket_Overlay.pm. Have I missed
something? How should I import ticket history into the Transaction table
without risking me kneecaps?

Best regards,
Johan Schön, Capgemini

Hi,

The command line rt tool is probably your best bet.

Getting the data out of your legacy system is the first step though.

I ignored this advice and wrote my own import program which inserted
10 years worth of tickets, users and groups, after studying the
database schema and how relations were built by adding test data.
This approach was probably more costly in time and effort.

I’m very soon going to have to do it all over again and I think I’ll
attempt to make use of the rt tool instead, this time.

JohnOn 9/12/06, Johan Schoen johan.schon@capgemini.com wrote:

Hi,

Where can I find information about how to import ticket data, including
history, from a legacy system into RT? Using Google, I have found no useful
information. I also can not find any information about migration in the RT
Essentials book - are there any?

Reading the RT 3.6.0 source code and module documentation I found the
RT::ticket::Import method in Ticket_Overlay.pm which I guess can be used to
import the current ticket data. However, I have been unable to understand
how to import ticket history. The Create method in Transaction_Overlay.pm
looks like it could be used for migrating ticket history, but according the
documentation in Transaction_Overlay.pm, RT::Transaction::Create must not be
called directly - only by RT::Ticket. I have not found any useful method for
import ticket history in Ticket.pm or Ticket_Overlay.pm. Have I missed
something? How should I import ticket history into the Transaction table
without risking me kneecaps?

Best regards,
Johan Schön, Capgemini


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Hi,

I want to know best practice of importing ticket data, including history,
from a legacy ticket system into RT.

I wrote:

How should I import ticket history into the
Transaction table without risking me kneecaps?

The command line rt tool is probably your best bet.

I can probably use the rt CLI to import the main ticket data into RT, but
I can not figure out how to use it to import history from the legacy system.
Is it possible? How do you do it?

Best regards,
Johan Schön

I want to know best practice of importing ticket data,
including history,
from a legacy ticket system into RT.

I wrote:

How should I import ticket history into the
Transaction table without risking me kneecaps?

The command line rt tool is probably your best bet.

I can probably use the rt CLI to import the main ticket data
into RT, but
I can not figure out how to use it to import history from the
legacy system.
Is it possible? How do you do it?

When I imported data from our legacy system, I did not bother with
trying to import individual transactions into RT. Rather, I just
included the entire content of the legacy ticket’s history as one
transaction in RT. What advantage do you hope to gain by importing
history one transaction at a time?

Also, I used:

use RT::Ticket;
use RT::Interface::CLI qw(CleanEnv);

Rather than trying to muck around with the rt command-line tool. This
gave me more flexibility with custom fields and the like.

Eric Schultz
United Online

At Tuesday 9/12/2006 10:07 AM, Johan Schoen wrote:

Hi,
I want to know best practice of importing ticket data, including history,
from a legacy ticket system into RT.
I wrote:

How should I import ticket history into the Transaction table
without risking me kneecaps?

Johan,

I’d definitely recommend writing a custom perl script that uses the
RT API. There’s a sample script on the wiki in the Contributions
section (rt-adduser) that should get you started.

You’ll probably want to find a way to turn off RT’s outgoing email
when you load tickets, otherwise your users may get mail relating to
old tickets. Also, I found that turning off all scrip processing
speeds up the load considerably. I hacked the RT perl code to do both
these things.

Steve