[rt-devel] Trouble Importing from RT2

Eric Horne eric.horne at teradyne.com
Wed Aug 27 02:20:11 EDT 2003


I've been trying to import my tickets from RT2 since about May with no 
success. I've finally had a few hours to go debug and I'm hoping what I 
can report can help someone more familiar with the code point me in the 
right direction..

Problem: Things import just fine, but they do not get displayed in RT. 
That is, Queues and users are there, but the queues appear to have no 
tickets in them. Further, the Database is fully populated with tickets 
and transactions (so that data *is* there, but RT doesn't think it is). 
Each ticket/transaction has an effective ID of "0". Upon setting that 
field to the ticket id, RT suddenly comes to life, but still seems a bit 
shakey.

What I found: Originally, I found that the user who created the queues 
in the first place was not getting imported due to an e-mail address 
conflict. This was confusing the imports I guess. Once fixed, I got no 
import errors, but still no visible tickets.

Ok, so I've traced it down and found this: it appears that 
RT::Record::Create, when called from Rt::Ticket is returning an id of 
"240" for the first ticket inserted into the database, even though the 
array passed into Create has "id => 1" (I checked at all levels, this is 
true). 240 is the last id entered into the CustomFieldsValues table. I 
have commented out Scrips import, but when that is imported, Create 
returns the id of the last Script put into the database. Inside 
Ticket::Create, $self->Id is 'undef' -- can't figure that one out yet. 
It further looks like $RT::Handle has an "id => 240" field in it when it 
is called from DBIx::SearchBuilder::Record.. is that correct?

Record::Create returns with "Object created" message
Ticket::Create returns with "Ticket  created in queue 'general'" -- note 
the double space between Ticket and created; it thinks its Id is undef.

Can someone help me understand what I'm seeing?

Thanks

-Eric









More information about the Rt-devel mailing list