Re: [rt-users] Importing ticketing data into the RT SQL database

2016-04-27 Thread Emmanuel Lacour
Le 27/04/2016 18:30, Dave Florek a écrit :
> Hi,
> 
> I'm about to import a large amount of ticketing data into the RT SQL
> database. I spotted three sections in the SQL db
> (objectcustomfieldvalues, attachments, tickets) to import the data to.
> Since I'm unfamiliar with the db backend, can I generate any of my own
> set of identifiers as long as they aren't duplicate of the identifiers
> that are already present in the SQL db?
> 
> 

I strongly suggest to use the RT perl API by writting a script taht does
sql in source DB and create tickets/users/rt objects using the RT API.
Doing this with RT cli is possible but will be very slow will not allow
you to skip some internal RT auto-et of values (such as Created date for
transactions, tickets, ...).

Here is an example script I did to import tickets from a third party DB
(ICW) into RT. It's just an example as it was done for a one shot
execution and very specific needs, but this way we imported more than
300k tickets with users/history/customfields.




-- 
Easter-eggs  Spécialiste GNU/Linux
44-46 rue de l'Ouest  -  75014 Paris  -  France -  Métro Gaité
Phone: +33 (0) 1 43 35 00 37-   Fax: +33 (0) 1 43 35 00 76
mailto:elac...@easter-eggs.com  -   http://www.easter-eggs.com


import-icw.pl
Description: Perl program
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Importing ticketing data into the RT SQL database

2016-04-27 Thread Parish, Brent
Hi Dave

Documentation can be found here:  https://www.bestpractical.com/docs/rt/4.4/

Not sure which side you made the custom fields on?  If you mean in the old 
system that you are importing into RT, it shouldn’t be an issue (not from the 
RT side I mean).
RT has some fantastic support for custom fields.  Some of the fields from the 
old systems that I exported (and imported into RT) went into 
stock/out-of-the-box RT fields (e.g. subject, date started, etc).  Others went 
into custom fields I had created in RT for the import.  These can be easily 
created and maintained via the RT web interface.
The CLI interface supports data entry into RT custom fields, as do the REST and 
Command-by-mail interfaces.




From: Dave Florek [mailto:dave.a.flo...@gmail.com]
Sent: Wednesday, April 27, 2016 2:09 PM
To: Parish, Brent <bpar...@cognex.com>
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Importing ticketing data into the RT SQL database

Hi Brent,

Thanks for the heads up. Does Best Practical keep any updated documentation on 
the RT CLI syntax somewhere as the RT versions change? I have the Essentials 
book and the Wikia has some useful information, but I'd like something that 
provides in-depth coverage. I made several custom fields, so I'm not sure how 
that would change the CLI inputs. This is going to be a fun expedition.

Sincerely,
Dave

On Wed, Apr 27, 2016 at 1:05 PM, Parish, Brent 
<bpar...@cognex.com<mailto:bpar...@cognex.com>> wrote:
Hi Dave

I would strongly recommend against importing ticket data directly into the RT 
database, I sincerely doubt you will end up with anything usable!
There are a myriad of internal references (very normalized table structure, as 
I’m sure you saw).

There may be better ways to do it, but when I had to  shift tickets from two 
different support tools into RT I wrote an importer to do it.
The importer used RT’s command line interface to push the old systems into RT, 
one ticket at a time.
That way, RT creates all the requisite references, objects, etc.

As to adding your own fields to the RT database, I cannot answer that, sorry!


-  Brent



From: rt-users 
[mailto:rt-users-boun...@lists.bestpractical.com<mailto:rt-users-boun...@lists.bestpractical.com>]
 On Behalf Of Dave Florek
Sent: Wednesday, April 27, 2016 12:31 PM
To: rt-users@lists.bestpractical.com<mailto:rt-users@lists.bestpractical.com>
Subject: [rt-users] Importing ticketing data into the RT SQL database

Hi,

I'm about to import a large amount of ticketing data into the RT SQL database. 
I spotted three sections in the SQL db (objectcustomfieldvalues, attachments, 
tickets) to import the data to. Since I'm unfamiliar with the db backend, can I 
generate any of my own set of identifiers as long as they aren't duplicate of 
the identifiers that are already present in the SQL db?

Thanks in advance,

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Importing ticketing data into the RT SQL database

2016-04-27 Thread Parish, Brent
Hi Dave

I would strongly recommend against importing ticket data directly into the RT 
database, I sincerely doubt you will end up with anything usable!
There are a myriad of internal references (very normalized table structure, as 
I’m sure you saw).

There may be better ways to do it, but when I had to  shift tickets from two 
different support tools into RT I wrote an importer to do it.
The importer used RT’s command line interface to push the old systems into RT, 
one ticket at a time.
That way, RT creates all the requisite references, objects, etc.

As to adding your own fields to the RT database, I cannot answer that, sorry!


-  Brent



From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of 
Dave Florek
Sent: Wednesday, April 27, 2016 12:31 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Importing ticketing data into the RT SQL database

Hi,

I'm about to import a large amount of ticketing data into the RT SQL database. 
I spotted three sections in the SQL db (objectcustomfieldvalues, attachments, 
tickets) to import the data to. Since I'm unfamiliar with the db backend, can I 
generate any of my own set of identifiers as long as they aren't duplicate of 
the identifiers that are already present in the SQL db?

Thanks in advance,
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


[rt-users] Importing ticketing data into the RT SQL database

2016-04-27 Thread Dave Florek
Hi,

I'm about to import a large amount of ticketing data into the RT SQL
database. I spotted three sections in the SQL db (objectcustomfieldvalues,
attachments, tickets) to import the data to. Since I'm unfamiliar with the
db backend, can I generate any of my own set of identifiers as long as they
aren't duplicate of the identifiers that are already present in the SQL db?

Thanks in advance,
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016