[rt-users] Inserting tickets directly to database

Peter Silver psilver at ultrafast.com.au
Tue Jun 29 19:37:51 EDT 2004


On Tue, 2004-06-29 at 18:44, Jonas Lindvall (AllTele) wrote:
> Is there any good way to do this. I have a set of 
> about 4000 tickets from our old text based simple system.
>  
> And importing thoose to RT is probably pretty 
> simple if i just could figure out how to add a 
> ticket manually, anyone can help??

Surely the easiest way would be to disable any auto-responding Scrips,
then write a simple script to loop through each ticket and;

  1.  Extract the ticket info from the old data source
  2.  Compile an email containing the ticket body & attachments, and set
      the From: address to that of the original sender.
  3.  Insert a header containing the ticket ID of the original ticket
      (so you have a way of mapping the old ticket to the new ticket)
  4.  Send the email to the destination queue address.

That way you wouldn't need to worry about adding the correct info to
each RT table -- each imported ticket would be handled exactly like a
new ticket.

The only lost info might be the creation date of each ticket, though you
could easily loop through each ticket again and correct the Created date
of each transaction associated with the ticket.


Peter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20040630/ff2dc602/attachment.sig>


More information about the rt-users mailing list