Documentation for JIRA 4.2. Documentation for other versions of JIRA is available too. 
![]()
There are currently two ways to import Bugzilla issue into JIRA:
We would encourage you to use the new Importers Plugin, as we have worked hard on improving it. However, if you wish to use the old built-in importer, we have included the documentation below.
On this page:
The JIRA Importers Plugin can import your bugs from Bugzilla. Version 1.3 of the JIRA Importers Plugin is compatible with Bugzilla 2.20 to 3.6.3. Users of older Bugzilla versions will need to first upgrade the Bugzilla database tables to a supported version, using Bugzilla's checksetup.pl script. The JIRA Importers Plugin requires your Bugzilla database to be MySQL or PostgreSQL.
For the very latest version of the JIRA Importers Plugin, please visit plugins.atlassian.com.
Please Note: JIRA's character encoding is set to UTF-8 by default. If, however, your JIRA installation's character encoding is set to something other than UTF-8, you may encounter problems with importing data from Bugzilla. For more information, please refer to JRA-14432. Importing Bugzilla data into a non-UTF-8 JIRA installation is not supported.
The import process consists of:
These steps are described in more detail below.
During the import process, the following data is copied from the Bugzilla database into JIRA:
In Bugzilla |
In JIRA |
Import Notes |
|
|---|---|---|---|
Product |
Project |
Bugzilla data is imported on a per-project basis. You can either specify an existing JIRA project as the target, or the importer will automatically create a project(s) for you at time of import. (For more information about JIRA projects, please see Defining a Project.) |
|
External Project |
Project Category |
|
|
Component |
Component |
You can choose to have the importer automatically create your Bugzilla component(s) in JIRA, or choose to have bugs imported into no component in JIRA. |
|
Milestone |
Fix Version |
Versions are imported from Bugzilla (if you choose), and are set to the Un-Released and Un-Archived state. |
|
Bug |
Issue |
Every Bugzilla bug becomes a JIRA issue of type 'Bug', with one exception: a Bugzilla issue with severity 'Enhancement' becomes a JIRA issue of type 'Improvement' and priority 'Major'. |
|
ID |
Bugzilla ID |
Each imported issue will be given a new JIRA ID, and the old Bugzilla ID will be saved into a JIRA custom field called 'Bugzilla ID'. This custom field is searchable, so you can search for JIRA issues by their old Bugzilla ID. There is also a gadget which lets you search by Bugzilla ID. The field links to the original Bugzilla bug URL, if you configure 'URL to Bugzilla' in jira-application.properties. The custom field can also be made to display just the Bugzilla ID (unlinked) in jira-application.properties. If you don't need this custom field, delete it or 'hide' it (as described in Specifying Field Behaviour). |
|
Summary |
Summary |
|
|
Description |
Description |
|
|
Comments |
Comments |
|
|
Attachments |
Attachments |
Attachments are extracted from the Bugzilla database and saved to disk. To specify the location on disk, see Configuring File Attachments. |
|
Severity |
Priority |
You can configure mapping of specific Bugzilla values to specific JIRA values. |
|
Status |
Status |
You can configure mapping of specific Bugzilla values to specific JIRA values.
|
|
Resolution |
Resolution |
You can configure mapping of specific Bugzilla values to specific JIRA values. |
|
Duplicates |
Link |
You can configure mapping of specific Bugzilla link types to JIRA link types.
|
|
Work History |
Work Log |
Each Bugzilla worklog report will appear in JIRA as a separate worklog entry. |
|
Estimated |
Original Estimate |
||
Remaining |
Remaining Estimate |
||
Logged |
Time Spent |
||
Votes |
Voters |
If a user has voted one or more times for a Bugzilla issue, a JIRA vote is stored for that user. |
|
CC List |
Watchers |
|
|
User |
User |
You can choose to have the importer automatically create JIRA users for any Bugzilla users who do not already exist in JIRA.
|
|
Other fields |
Custom fields |
If your Bugzilla system contains any custom fields, you can choose to map them to specific JIRA custom field(s). If your custom fields don't yet exist in JIRA, the importer can automatically create them for you. |
|
jdbc:mysql:host[:port]/databasename?parameters
Congratulations, you have successfully imported your Bugzilla projects into JIRA! If you have any questions or encounter any problems, please contact Atlassian support.
There are currently two ways to import Bugzilla issue into JIRA:
JIRA can import your bugs from Bugzilla. Currently, the built-in importer is compatible with Bugzilla 2.20 and above. Users of older Bugzilla versions will need to first upgrade the database tables to a supported version with Bugzilla's checksetup.pl script.
Please Note: JIRA's character encoding is set to UTF-8 by default. If, however, your JIRA installation's character encoding is set to something other than UTF-8, you may encounter problems with importing data from Bugzilla. For more information, please refer to JRA-14432. Importing Bugzilla data into a non-UTF-8 JIRA installation is not supported.
The data from the Bugzilla database is appended to the existing data in JIRA. The tool imports the following data from the Bugzilla database:
In Bugzilla |
In JIRA |
Special Notes |
|---|---|---|
Bugs |
Issues |
|
Product |
Project |
|
Version |
Version |
|
Component |
Component |
|
User |
User |
|
Before you begin, please backup your JIRA data.
If you are connecting to an external database to import Bugzilla data, you need to configure this database to connect to JIRA before the import will work. Read Connecting JIRA to a Database for more information. Remember to restart JIRA in order to allow the application to pick up any changes.
common/lib/ directory in JIRA Standalone, or equivalent "lib" directory in your app server. Restart JIRA so the driver is loaded.jdbc:mysql:host[:port]/databasename?parameters
Importing project(s) 'Xerces-P', 'Xindice', 'XmlCommons' 2004-02-27 15:34:10,031 INFO [atlassian.jira.util.BugzillaImportBean] Importing Project: Xerces-P 2004-02-27 15:34:10,052 INFO [atlassian.jira.util.BugzillaImportBean] Importing Project: XmlCommons 2004-02-27 15:34:10,061 INFO [atlassian.jira.util.BugzillaImportBean] Importing Project: Xindice 2004-02-27 15:34:10,069 INFO [atlassian.jira.util.BugzillaImportBean] 3 projects imported from Bugzilla. 2004-02-27 15:34:10,069 INFO [atlassian.jira.util.BugzillaImportBean] Importing Versions from project 'Xerces-P', 'Xindice', 'XmlCommons' 2004-02-27 15:34:10,071 INFO [atlassian.jira.util.BugzillaImportBean] Importing Version: 1.5.6 2004-02-27 15:34:10,080 INFO [atlassian.jira.util.BugzillaImportBean] Importing Version: unspecified 2004-02-27 15:34:10,087 INFO [atlassian.jira.util.BugzillaImportBean] Importing Version: SWIG-1.3 2004-02-27 15:34:10,093 INFO [atlassian.jira.util.BugzillaImportBean] Importing Version: 1.3 2004-02-27 15:34:10,098 INFO [atlassian.jira.util.BugzillaImportBean] Importing Version: 1.4 ... 2004-02-27 15:34:10,228 INFO [atlassian.jira.util.BugzillaImportBean] Importing Component: SWIG 2004-02-27 15:34:10,292 INFO [atlassian.jira.util.BugzillaImportBean] Importing Component: Test Scripts 2004-02-27 15:34:10,346 INFO [atlassian.jira.util.BugzillaImportBean] Importing Component: Documentation ... Importing Issues from project(s) 'Xerces-P', 'Xindice', 'XmlCommons' 2004-02-27 15:34:11,341 INFO [atlassian.jira.util.BugzillaImportBean] Importing Issue: "All files need Apache license" 2004-02-27 15:34:11,343 INFO [atlassian.jira.util.BugzillaImportBean] Importing User: jason1@openinformatics.com 2004-02-27 15:34:16,430 INFO [atlassian.jira.util.BugzillaImportBean] Importing Issue: "SEGV on: getAttributes() in list context" 2004-02-27 15:34:16,545 INFO [atlassian.jira.util.BugzillaImportBean] Importing Issue: "Sample code must be updated" 2004-02-27 15:34:16,680 INFO [atlassian.jira.util.BugzillaImportBean] Importing Issue: "SWIG 1.3 rohibits sub-classing of wrapped classes" 2004-02-27 15:34:16,878 INFO [atlassian.jira.util.BugzillaImportBean] Importing Issue: "AttributeList in Perl is broken (can't get attributes)" 2004-02-27 15:34:16,909 INFO [atlassian.jira.util.BugzillaImportBean] Importing User: dgrey@internap.com .... 2004-02-27 15:35:09,364 INFO [atlassian.jira.util.BugzillaImportBean] Importing User: ilm@doc.ic.ac.uk 2004-02-27 15:35:09,580 INFO [atlassian.jira.util.BugzillaImportBean] 144 issues imported from Bugzilla. 2004-02-27 15:35:09,581 INFO [atlassian.jira.util.BugzillaImportBean] Importing Votes 2004-02-27 15:35:09,747 INFO [atlassian.jira.util.BugzillaImportBean] 0 votes imported from Bugzilla. 2004-02-27 15:35:09,748 INFO [atlassian.jira.util.BugzillaImportBean] Reindexing (this may take a while)... 2004-02-27 15:35:11,282 WARN [jira.issue.index.AbstractDocument] Unable to index field 'created' from ANT-4 with value: 0002-11-30 00:00:00.0 2004-02-27 15:35:29,170 INFO [atlassian.jira.util.BugzillaImportBean] Import SUCCESS and took: 79142 ms.
It is possible to re-import a Bugzilla project, and have JIRA import only 'new' bugs not previously imported. This allows for a transition period in which the imported JIRA project can be trialled, but bugs still logged in Bugzilla need not be lost.
To import only new bugs, click the 'Import only new issues' checkbox in the importer.
The Bugzilla importer creates a 'Bugzilla ID' custom field for imported issues, linking back to the original Bugzilla bug URL.
If you intend to use this, you will need to configure the URL to Bugzilla in jira-application.properties. The custom field can also be made to display just the ID (unlinked) in jira-application.properties. If you don't need this custom field, delete it or hide it.
The custom field is searchable, so you can search for JIRA issues by their old Bugzilla ID. There is also a portlet which lets you search by Bugzilla ID:
The Bugzilla importer source code is available here. For some customisations you may wish to make, editing this source code is required, as described below. For users of JIRA Standalone, there is a mini build-system which you can use to quickly compile and test modifications.
Bugzilla has a standard set of severities, statuses and resolutions, but these can be augmented with new ones by editing a Bugzilla config file ('localconfig'). If your Bugzilla has custom statuses, JIRA will set the status of affected imported issues to "Open", and log a message ("... defaulting to JIRA status Open"). For other unknown fields (severities, resolutions) JIRA will just not set the field, which may cause problems later (eg. issues Resolved but without a resolution are listed as open in the standard filters).
To avoid problems, it is a good idea to check whether your Bugzilla uses any custom resolutions, statuses or severities:
mysql> select distinct(severity) from bugs; +-------------+ | severity | +-------------+ | blocker | | critical | | enhancement | | major | | minor | | normal | | trivial | +-------------+ 7 rows in set (0.00 sec) mysql> select distinct(resolution) from bugs; +------------+ | resolution | +------------+ | FIXED | | DUPLICATE | | WONTFIX | | | | LATER | | INVALID | | WORKSFORME | | REMIND | +------------+ 8 rows in set (0.00 sec) mysql> select distinct(bug_status) from bugs; +-------------+ | bug_status | +-------------+ | RESOLVED | | CLOSED | | NEW | | ASSIGNED | | REOPENED | | VERIFIED | | UNCONFIRMED | +-------------+ 7 rows in set (0.00 sec)
(the above are all standard). If your bugs use anything non-standard, you will need to edit the mappings in BugzillaImportBean.java:
static
{
// bugzilla's severities mapping to JIRA priorities
priorityMap.put("blocker", "" + IssueFieldConstants.BLOCKER_PRIORITY_ID);
priorityMap.put("critical", "" + IssueFieldConstants.CRITICAL_PRIORITY_ID);
priorityMap.put("major", "" + IssueFieldConstants.MAJOR_PRIORITY_ID);
priorityMap.put("normal", "" + IssueFieldConstants.MAJOR_PRIORITY_ID);
priorityMap.put("enhancement", "" + IssueFieldConstants.MINOR_PRIORITY_ID);
priorityMap.put("minor", "" + IssueFieldConstants.MINOR_PRIORITY_ID);
priorityMap.put("trivial", "" + IssueFieldConstants.TRIVIAL_PRIORITY_ID);
// bugzilla resolutions mapping to JIRA resolutions
resolutionMap.put("", null);
resolutionMap.put("FIXED", "" + IssueFieldConstants.FIXED_RESOLUTION_ID);
resolutionMap.put("INVALID", "" + IssueFieldConstants.INCOMPLETE_RESOLUTION_ID);
resolutionMap.put("WONTFIX", "" + IssueFieldConstants.WONTFIX_RESOLUTION_ID);
resolutionMap.put("LATER", "" + IssueFieldConstants.WONTFIX_RESOLUTION_ID);
resolutionMap.put("REMIND", "" + IssueFieldConstants.WONTFIX_RESOLUTION_ID);
resolutionMap.put("DUPLICATE", "" + IssueFieldConstants.DUPLICATE_RESOLUTION_ID);
resolutionMap.put("WORKSFORME", "" + IssueFieldConstants.CANNOTREPRODUCE_RESOLUTION_ID);
resolutionMap.put("NEEDTESTCASE", "" + IssueFieldConstants.INCOMPLETE_RESOLUTION_ID);
// bugzilla status mapping to JIRA status
statusMap.put("UNCONFIRMED", "" + IssueFieldConstants.OPEN_STATUS_ID);
statusMap.put("NEW", "" + IssueFieldConstants.OPEN_STATUS_ID);
statusMap.put("ASSIGNED", "" + IssueFieldConstants.OPEN_STATUS_ID);
statusMap.put("REOPENED", "" + IssueFieldConstants.REOPENED_STATUS_ID);
statusMap.put("RESOLVED", "" + IssueFieldConstants.RESOLVED_STATUS_ID);
statusMap.put("VERIFIED", "" + IssueFieldConstants.RESOLVED_STATUS_ID);
statusMap.put("CLOSED", "" + IssueFieldConstants.CLOSED_STATUS_ID);
// workflow Mappings
wfStepMap.put("1", new Integer("1"));
wfStepMap.put("2", new Integer("2"));
wfStepMap.put("3", new Integer("3"));
wfStepMap.put("4", new Integer("5"));
wfStepMap.put("5", new Integer("4"));
wfStepMap.put("6", new Integer("6"));
wfStatusMap.put("1", "Open");
wfStatusMap.put("3", "In Progress");
wfStatusMap.put("4", "Reopened");
wfStatusMap.put("5", "Resolved");
wfStatusMap.put("6", "Closed");
}
(Note: wfStepMap and wfStatusMap should usually not be touched, unless you are importing into project with a non-standard workflow).
Bugzilla uses email addresses for usernames (eg. "joe@example.com"). You may wish to automatically strip everything after the '@' to form a shortened username ("joe"), or otherwise alter imported names (eg. read from a lookup table to conform to a company-wide standard). This requires editing the BugzillaImportBean source (see above ). The relevant code to modify is included in BugzillaImportBean.java, but commented out:
/**
* Given a Bugzilla 'profile' user record, infer a JIRA username from it.
* In Bugzilla your username is your email address, and this will become your JIRA username, unless this method
* is overridden to implement a different scheme.
*/
protected String getUsernameFromBugzillaProfile(ResultSet bugzillaProfileResultSet)
throws SQLException
{
return TextUtils.noNull(bugzillaProfileResultSet.getString("login_name")).toLowerCase().trim();
// Alternatively, use the first part ('joe' in 'joe@company.com')
// String name = bugzillaProfileResultSet.getString("login_name");
// name = TextUtils.noNull(name).trim();
// int i = name.indexOf("@");
// if (i != -1) name = name.substring(0, i);
// return name;
}