Click here to Skip to main content
Click here to Skip to main content

A Utility for BugZilla Users to Import Bugs from Excel File

, 6 Dec 2008 CPOL
Rate this:
Please Sign up or sign in to vote.
An article for BugZilla users to import their old/new bugs from Excel file to the bug tracking system.
BugZilla importer utility to import bugs from excel file to the system.


Recently our organization adopted BugZilla as the bug tracking system and we needed to shift lots of bugs from one local bug tracking system to BugZilla. I Googled a little for such a utility providing a feature for importing bugs from outside the system in any format. But I didn't find such a handy utility to meet my requirements. This custom utility will help BugZilla users having a requirement for importing lots of bugs to the system. They can also make the enhancements with the current utility to meet their requirements in the process of importing bugs.


The basic requirements for this utility to run are bugzproxy-0.2.0 and You can download both of them from Google code:

  • bugzproxy-0.2.0: BugZProxy basically used to communicate with BugZilla system. It provides a class library to work with BugZilla's entity like Server, Bug, Product, etc.
  • XML-RCP basically used by the BugZProxy internally to call the BugZilla's Web services & methods to perform actions like CreateBug, Login, AppendComment, etc.

Along with this, if you are a non-technical person and directly using this utility to import your bugs from EXCEL file to BugZilla system, you need to have your Excel file in a given specific format so that this utility can read it properly.

Excel files need to have the following named columns in it, and possible values to those columns are written in parenthesis. Some column's values must match your BugZilla's configured values. I am using values which are configured in my system.

  • Priority (P1, P2, P3, P4, P5)
  • Severity (cosmetic, critical, major, minor, normal)
  • FixBy (version name of your BugZilla's product)
  • Resolved By (any user name of BugZilla system)
  • Comments (This is the field used for additional comment if any user has posted after the bug has been created (not in BugZilla but in any other system). You can keep it empty if not used.)
  • ReproSteps (This field will map to the Description field of BugZilla's system.)
  • Title (This field will map to the Summary field of BugZilla's system.)

One more thing with the given Excel file is that the name of your worksheet from which you are importing bugs, must be "Bugs".

If you are a technical person, you can customize code to meet your Excel format.

Notes: While creating the bugs, some assumptions have been made with the bug details. Some of them are listed below:

  • OperatingSystem has been defaulted to "Windows"
  • Platform has been defaulted to "Other"
  • Status has been defaulted to "NEW"
  • targetMilestone has been defaulted to "---"

Using the Code

This whole implementation is pretty simple VB.NET code to use the above mentioned class library functions.

BugZProxy's Server class is used to programmatically login to the BugZilla system with the supplied credentials.

Dim oServer As New Server(ServerName.Text.ToString, Port.Text.ToString, _
oServer.Login(UserName.Text.ToString, Password.Text.ToString, True)

Then we may have multiple products within a single BugZilla system, so we will find the supplied product from the list to import bugs to that product. 

Dim iIDs() As Integer = oServer.GetAccessibleProductIds()
Dim oProducts() As Product = oServer.GetProducts(iIDs)
Dim iID As Integer = 0
For Each objProd As Product In oProducts
    If objProd.Name = ProductName.Text.ToString Then
        iID = objProd.Id
    End If
Next Dim oProduct As Product = oServer.GetProduct(iID)

After getting the product, we will fill the dataset from the Excel file - that is simple OLEDB code, so I haven't mentioned it here.

A final call to CreateBug() method will create the bug in the system and return that bug's reference.

oBug = oProduct.CreateBug("", ComponentName.Text.ToString, objDR("FixBy"), _
	"Windows", "Other", objDR("Title"), strTemp, objDR("Priority"), _
         	objDR("Severity"), "NEW", "---", objDR("ResolvedBy"), Nothing, _


  • 3rd December, 2008: Article created


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior) Elan Emerging Technologies Pvt Ltd.
India India
I am a master graduate from Ahmedabad,India.I am in programming since last 2 years,and i love this job of programmer and wanted to do programming for lifetime.

Comments and Discussions

Questiongetting error of parameter alias, can you please help me to solve it PinmemberMember 965402829-Jan-13 2:01 
QuestionUNable to login PinmemberMember 153198127-Aug-12 11:14 
QuestionRequires modification to work with Bugzilla/Testopia 3.4+ Pinmembernetcatz992-Apr-12 9:08 
GeneralCan any body give some code to get all the bugs in bugzilla in Pinmembersriramcse3128-Apr-11 5:13 
QuestionTrying to get bugs out of Bugzilla into Visual studio browser Pinmembersriramcse3128-Apr-11 5:11 
GeneralMy vote of 1 PinmemberNick.Langstone26-Jan-11 14:43 
QuestionStill relevant? PinmemberKrazny23-Jan-11 23:23 
AnswerRe: Still relevant? PinmemberAmitChampaneri23-Jan-11 23:32 
GeneralError while publishing this code as a application PinmemberArchana Pandey25-Aug-09 4:44 
GeneralFollowing error observed while running demo Pinmemberalokband13-Jul-09 11:58 
GeneralRe: Following error observed while running demo PinmemberAmitChampaneri13-Jul-09 19:30 
GeneralRe: Following error observed while running demo Pinmemberalokband14-Jul-09 8:38 
GeneralI get the following Error when using your demo and source code PinmemberMember 92073310-Jul-09 7:34 
Generalgood article PinmemberDonsw19-Jun-09 19:33 
Generalneed help with an error! PinmemberPeter Man Chiu Kam8-May-09 8:07 
GeneralI also need help with an error! PinmemberStaceyBasiliere30-Jun-09 10:25 
GeneralRe: I also need help with an error! PinmemberAmitChampaneri30-Jun-09 19:28 
GeneralProxy Authentication Required Pinmemberalexruf30-Jan-09 5:28 
GeneralProblem in setting the resolution of a bug in Bugzilla using C# Pinmemberdineshh22o27-Jan-09 20:23 
GeneralRe: Problem in setting the resolution of a bug in Bugzilla using C# PinmemberAmitChampaneri27-Jan-09 20:44 
Generalhelp needed Pinmembernitesh_mps18-Dec-08 20:29 
GeneralRe: help needed PinmemberAmitChampaneri18-Dec-08 20:37 
GeneralRe: help needed Pinmembernitesh_mps19-Dec-08 1:44 
GeneralRe: help needed PinmemberAmitChampaneri19-Dec-08 1:59 
GeneralRe: help needed Pinmembernitesh_mps21-Dec-08 23:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411019.1 | Last Updated 6 Dec 2008
Article Copyright 2008 by AmitChampaneri
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid