Click here to Skip to main content
15,881,281 members
Articles / Programming Languages / Visual Basic
Article

A Utility for BugZilla Users to Import Bugs from Excel File

Rate me:
Please Sign up or sign in to vote.
2.47/5 (4 votes)
6 Dec 2008CPOL3 min read 80.8K   2.4K   13   25
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.

Introduction

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.

Requirements

The basic requirements for this utility to run are bugzproxy-0.2.0 and xml-rpc.net.2.1.0. 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-rpc.net.2.1.0: 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.

VB.NET
Dim oServer As New Server(ServerName.Text.ToString, Port.Text.ToString, _
					Path.Text.ToString,False,Nothing)
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. 

VB.NET
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.

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

History

  • 3rd December, 2008: Article created

License

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


Written By
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 Pin
Member 965402829-Jan-13 1:01
Member 965402829-Jan-13 1:01 
QuestionUNable to login Pin
Member 153198127-Aug-12 10:14
Member 153198127-Aug-12 10:14 
QuestionRequires modification to work with Bugzilla/Testopia 3.4+ Pin
netcatz992-Apr-12 8:08
netcatz992-Apr-12 8:08 
GeneralCan any body give some code to get all the bugs in bugzilla in VB.net Pin
sriramcse3128-Apr-11 4:13
sriramcse3128-Apr-11 4:13 
QuestionTrying to get bugs out of Bugzilla into Visual studio browser Pin
sriramcse3128-Apr-11 4:11
sriramcse3128-Apr-11 4:11 
GeneralMy vote of 1 Pin
Nick.Langstone26-Jan-11 13:43
Nick.Langstone26-Jan-11 13:43 
QuestionStill relevant? Pin
Krazny23-Jan-11 22:23
Krazny23-Jan-11 22:23 
AnswerRe: Still relevant? Pin
AmitChampaneri23-Jan-11 22:32
AmitChampaneri23-Jan-11 22:32 
GeneralError while publishing this code as a application Pin
Archana Pandey25-Aug-09 3:44
Archana Pandey25-Aug-09 3:44 
GeneralFollowing error observed while running demo Pin
alokband13-Jul-09 10:58
alokband13-Jul-09 10:58 
GeneralRe: Following error observed while running demo Pin
AmitChampaneri13-Jul-09 18:30
AmitChampaneri13-Jul-09 18:30 
GeneralRe: Following error observed while running demo Pin
alokband14-Jul-09 7:38
alokband14-Jul-09 7:38 
GeneralI get the following Error when using your demo and source code Pin
Member 92073310-Jul-09 6:34
Member 92073310-Jul-09 6:34 
Generalgood article Pin
Donsw19-Jun-09 18:33
Donsw19-Jun-09 18:33 
Generalneed help with an error! Pin
Peter Man Chiu Kam8-May-09 7:07
Peter Man Chiu Kam8-May-09 7:07 
GeneralI also need help with an error! Pin
StaceyBasiliere30-Jun-09 9:25
StaceyBasiliere30-Jun-09 9:25 
GeneralRe: I also need help with an error! Pin
AmitChampaneri30-Jun-09 18:28
AmitChampaneri30-Jun-09 18:28 
GeneralProxy Authentication Required Pin
alexruf30-Jan-09 4:28
alexruf30-Jan-09 4:28 
GeneralProblem in setting the resolution of a bug in Bugzilla using C# Pin
dineshh22o27-Jan-09 19:23
dineshh22o27-Jan-09 19:23 
GeneralRe: Problem in setting the resolution of a bug in Bugzilla using C# Pin
AmitChampaneri27-Jan-09 19:44
AmitChampaneri27-Jan-09 19:44 
Generalhelp needed Pin
nitesh_mps18-Dec-08 19:29
nitesh_mps18-Dec-08 19:29 
GeneralRe: help needed Pin
AmitChampaneri18-Dec-08 19:37
AmitChampaneri18-Dec-08 19:37 
GeneralRe: help needed Pin
nitesh_mps19-Dec-08 0:44
nitesh_mps19-Dec-08 0:44 
GeneralRe: help needed Pin
AmitChampaneri19-Dec-08 0:59
AmitChampaneri19-Dec-08 0:59 
GeneralRe: help needed Pin
nitesh_mps21-Dec-08 22:14
nitesh_mps21-Dec-08 22:14 

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

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