Open Bug 324974 Opened 18 years ago Updated 17 years ago

Import bugs as CSV (by converting to XML)

Categories

(Bugzilla :: Bug Import/Export & Moving, enhancement, P3)

2.21
enhancement

Tracking

()

People

(Reporter: mkanat, Unassigned)

Details

I think a lot of people want to import things into Bugzilla in CSV format.

Using Text::CSV::Simple, this is pretty easy. We can read in the CSV into an array of hashes, convert it to the Bugzilla XML format, and import the bugs.

See also bug 223071, which created a direct CSV import. But I'd rather just do the conversion to XML, which keeps our importing code centralized.
Many fields are mandatory to correctly import data into Bugzilla. I'm fine doing the conversion as long as these fields are present. But importing partial data is a mess and pretty useless. This makes me think that flags and attachments could probably not be imported.
(In reply to comment #1)
Yeah, I completely agree. I don't want to handle multi-line CSV fields anyhow -- they're a pain. Attachments can be imported some other way. Most of the time people don't need to import attachments, though, if they're getting their bugs in CSV (or Excel) format.
In addition to attachments and flags, I am not aware of an easy way to handle long_desc data. 

Since bugzilla currently only exports as CSV information contained on a buglist, I assume you want to import CSVs from external systems? 
Otherwise we will be missing a lot of required information. Especially since the CSV output from the buglist is determined by what columns they are viewing etc.

If so, I believe there are already conversion utilities to export a spreadsheet to XML. IMHO if I am going to take the time to ensure that I have included all the needed information in a CSV file (conforming to the DTD), I could have just as easily created an XSL stylesheet (which I would likely have to do anyway) and done the conversion myself.
(In reply to comment #3)
> In addition to attachments and flags, I am not aware of an easy way to handle
> long_desc data.

  Nor am I. CSV does support multi-line fields, though, and I think Text::CSV_XS (which Text::CSV::Simple is based on) supports them.

> Since bugzilla currently only exports as CSV information contained on a
> buglist, I assume you want to import CSVs from external systems? 

  Right. People commonly get bug data from all sorts of vendors. They get it in Excel spreadsheets, usually.

> Otherwise we will be missing a lot of required information. Especially since
> the CSV output from the buglist is determined by what columns they are viewing
> etc.

  Yeah. We don't care about CSV output from Bugzilla. People should be using XML to move data from one Bugzilla to another.

> If so, I believe there are already conversion utilities to export a 
> spreadsheet to XML.

  I'm not really aware of one that will easily convert spreadsheet data into the exact Bugzilla XML format, that is well-known and can easily be used by a low-level QA engineer who is charged with importing external bug data.
Priority: -- → P3
Summary: Convert CSV to XML bug format, and import → Import bugs as CSV (by converting to XML)
You need to log in before you can comment on or make changes to this bug.