The default bug view has changed. See this FAQ.

importxml.pl crashes when importing keywords

RESOLVED FIXED in Bugzilla 4.0

Status

()

Bugzilla
Bug Import/Export & Moving
--
major
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jwiseheart, Assigned: Frédéric Buclin)

Tracking

({regression})

Bugzilla 4.0
regression
Bug Flags:
approval +
blocking4.2 +
approval4.0 +
blocking4.0.2 +

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: 4.0

I am importing bugs from a legacy home-grown application we have using a VB6 front end and a MySQL back end. I am performing the migration using importxml.pl. My XML export from the legacy system conforms to the Bugzilla DTD, and (thanks to the ability to add AND IMPORT TO custom fields, which is nice) have successfully imported ALL data from the old system into the new, with the sole exception of the Keywords field.

The error I get is the following: cvs:/srv/www/htdocs # ./importxml.pl -v bugsfile.xml
DBD::mysql::db do failed: Unknown column 'keywords' in 'field list' [for Statement "UPDATE bugs SET keywords = ? WHERE bug_id = ?"] at ./importxml.pl line 1147

My theory is this: Upon looking at the Bugzilla back end in MySQL, I'm guessing at one point in time, there was a 'Keywords' field in the 'bugs' table. For relational database purposes, it was probably decided to break the keywords out into a separate table, but importxml.pl was never updated to reflect this.

I'd try to fix it myself, but unfortunately Perl is not in my quiver of programming language arrows...

Thanks!

Reproducible: Always

Steps to Reproduce:
1. Do an import using importxml.pl
2. Make sure something is populated in the <keywords> element


Actual Results:  
cvs:/srv/www/htdocs # ./importxml.pl -v bugsfile.xml
DBD::mysql::db do failed: Unknown column 'keywords' in 'field list' [for Statement "UPDATE bugs SET keywords = ? WHERE bug_id = ?"] at ./importxml.pl line 1147

Expected Results:  
Imported keywords into the keywords table, related to the associated Bug ID. 

This is the only "technology" issue holding up our migration. Luckily, there are also training and political issues being resolved, so I have a little time to try to get a resolution to this issue.

Comment 1

6 years ago
  You're right about the cause of the problem! :-) I'm not sure who's maintaining importxml.pl these days, though.
(Assignee)

Comment 2

6 years ago
(In reply to comment #1)
> I'm not sure who's maintaining importxml.pl these days, though.

It's me, mostly.
Assignee: import-export → LpSolit
Status: UNCONFIRMED → ASSIGNED
Depends on: 69621
Ever confirmed: true
Flags: blocking4.2+
Flags: blocking4.0.2+
Keywords: regression
OS: Linux → All
Hardware: Other → All
Target Milestone: --- → Bugzilla 4.0
Version: unspecified → 4.0
(Assignee)

Comment 3

6 years ago
Created attachment 534312 [details] [diff] [review]
patch, v1
Attachment #534312 - Flags: review?(glob)
(Assignee)

Updated

6 years ago
Summary: importxml.pl not importing keywords → importxml.pl crashes when importing keywords
Comment on attachment 534312 [details] [diff] [review]
patch, v1

r=glob
Attachment #534312 - Flags: review?(glob) → review+
Flags: approval?
(Assignee)

Updated

6 years ago
Flags: approval?
Flags: approval4.0+
Flags: approval+
(Assignee)

Comment 5

6 years ago
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified importxml.pl
Committed revision 7821.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.0/
modified importxml.pl
Committed revision 7597.
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Reporter)

Comment 6

6 years ago
Thank you for responding to this. I will test it in our application this week, and let you know the result.
You need to log in before you can comment on or make changes to this bug.