download adobe indesign for mac microsoft office 2003 license key buy frontpage 2003 buy creative suite 4 buy microsoft project 2003 cheap adobe photoshop elements 8 microsoft office project professional 2003 complete package cs4 production premium for mac buy windows 7 ultimate mappoint 2009 european buy cubase sx windows vista home basic 32 bit product key cheap quicken 2010 buy ms project standard buy sql server access pricing purchase after effects purchase ms office online buy photoshop cs2 download adobe premiere pro mac presenter 7 adobe adobe photoshop cs3 mac buy microsoft access 2003 adobe photoshop cs3 discount inventor professional 2010 download buy vista home premium buy windows 2008 server r2 cheap adobe fireworks purchase windows 7 ultimate adobe premiere pro cs4 mac download download adobe cs4 design premium mac download wordperfect buy 3ds max 2009 3ds max 2010 oem microsoft excel 2007 product key microsoft mappoint 2009 north america autosketch 10 download buy adobe cs3 design standard buy adobe soundbooth buy microsoft onenote windows 2003 enterprise license price buy cs4 after effects download adobe indesign cs3 download microsoft powerpoint 2003 office 2003 for sale buy norton ghost 12 adobe indesign cs4 buy buy word 2007 visio 2007 buy windows vista home basic 64 bit oem cheap adobe illustrator cs3 corel draw 12 mac buy visio 2003 download buy cs4 design premium buy microsoft expression studio 3 download autocad architecture 2009 cs4 master collection demo download adobe illustrator cs3 buy quickbooks enterprise buy photoshop cs3 extended download microsoft visio 2007 buy windows xp product key online buy adobe cs3 master collection cheap microsoft office 2008 mac after effects mac system requirements windows 7 ultimate purchase download dvd moviefactory 6 plus download microsoft access 2003 microsoft office project professional 2007 complete package windows vista business price cheapest windows 7 ultimate full version microsoft word 2007 online download buy windows 2003 license buy microsoft powerpoint 2003 lightroom for mac os x turbo tax cost buy encarta 2009 buy encarta online buy mappoint 2009 download adobe captivate 4 buy windows xp online norton 360 cheapest price buy autocad lt 2010 quickbooks enterprise discount buy windows 7 home full coreldraw x4 mac turbotax 2009 deluxe coupons where to buy adobe flash cs3 microsoft office 2003 buy download get windows 7 ultimate 32bit buy adobe flash cs3 windows 7 home premium 32 bit oem buy windows 7 oem ultimate system requirements purchase windows 7 pro download corel dvd moviefactory 6 buy adobe robohelp 8 buy after effects cs4 corel video studio pro x2 price windows 7 ultimate 64 bit download windows vista business oem download microsoft windows 7 home premium best buy buy adobe premiere dreamweaver cs4 trial buy 3ds max online buy adobe acrobat 9 professional money 2007 home and business adobe premiere pro cs3 trial illustrator cs4 download streets and trips 2010 cost corel draw cheap cheap photoshop download inventor lt 2010 download buy norton 360 key buy photoshop elements 7 adobe cs4 master collection for mac buy microsoft office 2003 cheap buy captivate 3 indesign software cost cheap adobe dreamweaver microsoft office onenote 2003 download buy indesign cs3 software quicken rental property manager download buy windows 7 download microsoft expression web 2 adobe cs4 web premium oem turbotax cheap where to buy turbotax 2009 buy sql server 2008 web edition buy acrobat standard buy windows 7 home buy lightroom software photoshop elements 8 download buy adobe cs4 production premium windows vista home basic product key buy adobe fireworks cs4 when can i buy office 2010 corel draw 14 mac buy pagemaker 7.0 cheapest windows 7 home premium full version buy quickbooks premier 2009 windows 2003 enterprise licensing autodesk autocad 2010 download buy microsoft works 9.0 adobe cs4 design premium for mac buy windows 7 oem 64 bit nuendo 4 download full windows 7 ultimate 32bit system requirements turbotax price mac corel painter download adobe audition 3 download acrobat 9 purchase visual studio 2008 professional quickbooks enterprise download buy norton ghost online adobe after effects trial buy windows xp home windows 2003 enterprise price buy ms word 2007 download mappoint 2009 windows xp buy online buy premiere pro cs4 windows 7 ultimate license buy turbotax 2008 buy microsoft office 2003 license corel video studio pro x2 download where can i buy powerpoint 2003 buy ms office 2003 online buy vista home premium download buy autodesk inventor 2009 windows 7 home premium best price adobe dreamweaver mac os x buy adobe cs4 design premium mac adobe lightroom cheap autodesk inventor lt buy cs3 adobe adobe premiere elements 8 cheap download corel draw graphics suite x4 windows vista home basic 64 bit download download adobe presenter 7 windows 7 best price 3ds max design 2009 download buy windows 7 now download 3ds max design 2010 purchase windows xp license robohelp price buy autocad architecture nuendo 4 download adobe premiere pro cs3 system requirements windows 7 discount adobe captivate trial buy symantec antivirus cheap norton 360 v3 purchase photoshop elements best buy photoshop buy autocad architecture 2008 autocad inventor lt price cheap flash cs3 3ds max design 2009 digital image suite 2006 robohelp pricing buy turbotax 2007 autodesk navisworks download buy ms office 2003 standard download adobe cs4 design premium buy adobe flash cs4 buy streets and trips 2009 buy cs3 master collection buy autodesk maya 2009 money 2007 deluxe download windows 7 professional price comparison buy ms access online microsoft office 2003 product key adobe photoshop cs4 mac windows vista home basic 32 bit oem download adobe indesign cs4 purchase windows xp sp3 purchase microsoft windows vista windows 7 ultimate 64 bit product key buy windows 7 ultimate full corel draw sale buy dreamweaver cheap indesign for mac buy microsoft office project windows 2008 server prices buy office for mac maya price maya pricing microsoft office 2003 discount how to buy adobe presenter adobe photoshop to buy microsoft office 2008 for mac license download adobe photoshop elements 5.0 get autocad 2010 autocad mechanical 2010 download purchase corel draw 12 where can i buy powerpoint 2007 coreldraw 11 for mac download premiere elements 7 adobe creative suite 3 master collection download buy windows 7 pro oem microsoft office 2003 professional buy windows 7 premium download quickbooks premier 2008 mudbox pricing cheapest way to get windows 7 professional adobe cs3 cheap buy outlook express 2007 buy norton ghost 15 download microsoft works 9 buy wordperfect download microsoft expression 2 adobe photoshop cs3 sale autocad electrical 2010 system requirements buy microsoft vista microsoft expression studio price wordperfect download autocad 2010 trial microsoft windows 7 home premium 64 bit oem buy windows 7 home premium 64 adobe production premium cs4 download buy microsoft visio professional where to buy windows 2008 server buy sql 2008 purchase windows 7 64 bit coreldraw graphics suite x4 for mac buy autodesk inventor 2010 inventor professional 2009 download buy quicken online buy adobe contribute cheap purchase windows 7 discount buy microsoft office 2003 product key cheap autocad software norton ghost 12 download full adobe cs4 production premium for mac download quickbooks 2009 buy mappoint 2010 adobe contribute cs4 for mac windows vista business download norton ghost 15 price norton 360 price purchase windows vista product key autodesk inventor professional 2009 download adobe dreamweaver cs3 price after effects for mac download 3ds max 2010 download windows 7 ultimate price uk where to buy microsoft office cheap buy adobe master suite cs3 buy norton 360 product key 64 bit windows 7 home premium corel video studio download adobe photoshop cs4 buy download adobe illustrator for mac cheap microsoft works download adobe premiere pro cs4 turbotax premier discount buy office 2003 pro corel dvd moviefactory 6 download adobe framemaker 9 price buy adobe presenter 7 buy autodesk 3ds max design cheap autocad 2010 cheap photoshop elements download buy windows vista home premium buy cheap adobe illustrator buy microsoft excel 2007 cheap adobe cs4 mac turbotax 2008 discount download wavelab 4 buy adobe flash windows 7 pro download iso windows 7 professional sale download corel video studio 11 after effects cs3 download buy microsoft office mac 2008 ms office enterprise 2007 download download corel photoimpact x3 turbotax 2009 deluxe download buy cs4 photoshop windows xp buy download purchase microsoft office 2003 download cheap dreamweaver download cheap windows xp software windows 7 home premium pricing buy ms office online autocad electrical 2010 price microsoft powerpoint 2007 download buy windows xp cheap windows 7 home premium oem price autocad architecture download cheapest windows 7 pro buy microsoft autoroute buy dreamweaver cs3 for mac premiere pro cs3 streets and trips 2009 download dreamweaver mac system requirements purchase access 2007 ms works 9.0 windows xp sp3 download full download microsoft expression studio 3 buy navisworks adobe acrobat 9 cheap windows 7 professional cheapest price adobe after effects system requirements buy adobe photoshop elements 8 quickbooks enterprise cheap microsoft encarta premium 2009 download download microsoft streets and trips 2009 buy production premium cs4 adobe flash mac download buy microsoft frontpage 2002

Migration to Bugzilla 3.2.x from custom defect tracking solution

7
Feb/09
2

Since I use Google and blog and forum posts frequently to help solve problems, I felt it only appropriate to contribute back to the interwebs some of the solutions I have developed to solve problems.  So, here are the details for migrating from a custom defect tracking system in MS Access to Bugzilla 3.2.x.  I will be installing this in a Windows environment, but I like to work in the simpler world of Linux and then just copy over the data to Windows (If you want to use Windows as your sandbox, set it up by following https://wiki.mozilla.org/Bugzilla:Win32Install).

Setup your sandbox
I first created a sandbox by downloading a Fedora 10 virtual appliance (http://www.thoughtpolice.co.uk/vmware/#fedora10).  I then setup the Bugzilla environment with a simple command (see https://wiki.mozilla.org/Bugzilla:Linux_Distro_Installation).

yum install bugzilla httpd mysql-server phpmyadmin perl-CPAN

Now, if you want to get all of the basic add-ons, grab them by first running: /usr/share/bugzilla/checksetup.pl

Follow the instructions there to make sure you have all of the addons configured and database setup properly (e.g. /usr/bin/perl install-module.pl --all).

Start your servers: /etc/init.d/httpd start; /etc/init.d/mysqld start

Congrats.  Go to your server and make sure things are looking good (e.g. http://localhost).

Configuration Settings

Go ahead and configure Bugzilla parameters.  You will need to enable aliases and bug moving (for importing).  The aliases are only going to be used since I want to know the old bug # from the previous system.

Since that doesn’t install the latest version of Bugzilla, download the latest and overwrite the install /usr/share/bugzilla (latest stable release: http://www.bugzilla.org/download/#stable).  After downloading, run a command like:
tar xzvf bugzilla-3.2.2.tar.gz
/bin/cp -arf bugzilla-3.2.2./* /usr/share/bugzilla/

I’m going to wait on the actual upgrade of the DB until after the migration since the new version of Bugzilla has additional security features and I’m not sure if I’ll end up breaking some references between tables based on my import.  But, I wanted to have the latest version of importxml.pl since that has some updates for importing bugs.

Export the data to XML following the Bugzilla DTD

I exported from MS Access using the attached code.  Remember, you will need to install the MS DAO into your references (Tools >> References) when in the module editor.  Of course, you’ll have to modify your queries to produce the proper data for your custom system, but this should get well on your way.

Bugzilla XML export from MS Access utilizing VBScript: bugzilla-xml-export-from-ms-access-utilizing-vbscript.

Getting the data imported

Now, here is the tedious part.  You need to first have a bunch of data setup within Bugzilla so that the migration can go smoothly.  Otherwise, you’ll end up with a bunch of bugs in there that have no useful project, version, status, priority, severity, owner, etc.  You need to get all of this data and setup Bugzilla.  I recommend that you run some SELECT DISTINCT statements on your main data output query from MS Access to determine the other data you need to setup prior to import.

From those SELECT DISNTINCT statements, you can fill out this spreadsheet that I put together to manage the queries required to get the rest of the data setup.

Bugzilla setup SQL statements: Bugzilla Migration SQL.xls

Run the SQL statements using phpMyAdmin (http://localhost/phpMyAdmin).

Since, I don’t like Bugzilla’s severities, overwrite their severity table with the values I like (Bugzilla SQL status table overwrite).

You’ll need to define a default owner, product, component, etc.  Be sure do that the in administration parameters.

Before attempting to import into Bugzilla, I suggest that you take a DB snapshot so that when things don’t go well, you can easily get back to this initial state, add the missing data, and re-try the import.  Go to phpMyAdmin and do an ‘Export.”  Make sure that you ‘disable foreign key checks’ and include the ‘drop table’ statements.

Now attempt to import the XML file by using a command similar to the one below:

/usr/share/bugzilla/importxml.pl -v ~/bugzilla_migration.xml > ~/bugzilla_migration.log

Now check the ~/ bugzilla_migration.log for errors.  Look out for times when it says that it can’t locate the product, version, component, QAContact, status, priority, severity, etc.  Ignore errors with #PCDATA in them.

If you have errors to deal with, work through them by first restoring the bugs DB in phpMyAdmin.  Then add the proper lines into the Bugzilla excel spreadsheet and use the commands to add the missing values Bugzilla needed.  Re-import the file using the same commend.  Repeat this process each time until you only see #PCDATA errors in the file.

Congrats, you now have the data in Bugzilla.  Now, we’ll need to do some cleanup.

update longdescs set thetext = replace(thetext ,'at http://10.31.217.134/bugzilla/show_bug.cgi?','in Legacy System with ');
update bugs_fulltext set comments = replace(comments,'at http://10.31.217.134/bugzilla/show_bug.cgi?','in Legacy System with ');
update bugs_fulltext set comments_noprivate = replace(comments_noprivate,'at http://10.31.217.134/bugzilla/show_bug.cgi?','in Legacy System with ');
update longdescs set thetext = replace(thetext ,'Unknown bug field "#PCDATA" encountered while moving bug\n   <#PCDATA></#PCDATA>\n','');
update bugs_fulltext set comments = replace(comments,'Unknown bug field "#PCDATA" encountered while moving bug\n   <#PCDATA></#PCDATA>\n','');
update bugs_fulltext set comments_noprivate = replace(comments_noprivate,'Unknown bug field "#PCDATA" encountered while moving bug\n   <#PCDATA></#PCDATA>\n','');
update longdescs as ut set thetext = replace(thetext ,'This bug was previously known as _bug_', CONCAT('This bug was known as bug ',IFNULL((select alias from bugs where bug_id = ut.bug_id),''), '.\nThis bug was #'));
update bugs_fulltext as ut set comments = replace(comments, 'This bug was previously known as _bug_', CONCAT('This bug was known as bug ',IFNULL((select alias from bugs where bug_id = ut.bug_id),''), '.\nThis bug was #'));
update bugs_fulltext  as ut set comments_noprivate = replace(comments_noprivate, 'This bug was previously known as _bug_', CONCAT('This bug was known as bug ',IFNULL((select alias from bugs where bug_id = ut.bug_id),''), '.\nThis bug was #'));

Final Bugzilla Setup

We need to do the final DB upgrade to Bugzilla 3.2.2.  So, run the following command: /usr/share/bugzilla/checksetup.pl

Now, log into Bugzilla and make sure that everything is looking good.  You probably want to run the Sanity Check and finish setting up all of the parameters.  Finally, you probably want to disable bug aliases and bug moving (unless you need them for another reason)

Custom fields in Bugzilla

There is one final thing that is very useful for my project.  It is custom multiple select fields.  I’m not sure why the Bugzilla team hasn’t incorporated these fields into the search filter, so we’ll have to tweak some of the Bugzilla code.

I’ve based the two attached files on this posting: http://www.nabble.com/Adding-Custom-Field-drop-downs-to-Advanced-Search-Page-td16304546.html#a19165732.

Files: Bugzilla modified query.cgi, Bugzilla modified formhtml.tmpl

If you are using Bugzilla 3.2.2, you can probably just overwrite the files with what I have here.  Please see the above for where to put the files.

After doing this, you’ll need to re-compile your templates by executing checksetup.pl again.  Now, you’ll be able to report and search by your custom fields multiple select fields.

/usr/share/bugzilla/checksetup.Bugzilla SQL status table overwritepl

Congrats, I hope this was helpful.  Now you’ll need to finish customizing Bugzilla.

Share and Enjoy:
  • Facebook
  • email
  • LinkedIn
  • Digg
  • del.icio.us
  • Google Bookmarks
  • MySpace
  • TwitThis
  • StumbleUpon
  • Tumblr
  • Sphinn
  • Mixx
Comments (2) Trackbacks (0)
  1. Max Kanat-Alexander
    2:16 pm on February 7th, 2009

    Instead of overwriting the files in /usr/share/bugzilla/, you should remove the RPM (rpm -e bugzilla) and then install Bugzilla in /var/www/html/

    As far as everything else goes, I’m glad you posted your experiences! :-)

    -Max

  2. Susan Caverta
    10:54 pm on February 14th, 2009

    You are absolutely right: It is the experiences and what we learn from them.

Leave a comment

No trackbacks yet.