Skip to end of metadata
Go to start of metadata

Important!

Icon

If you try to re-import same project several times, then you must delete previously imported data before the next attempt.

Importing Issues from Bugzilla to YouTrack

General Procedure

To import issues from Bugzilla:

  1. Download the latest version of YouTrack's Python Client Library and unzip it.
  2. Install Python or Jython.
  3. Install mySQLdb Python Library.
  4. If needed, create a new mapping file to set the correspondence between source fields in Bugzilla and YouTrack issue's attributes. This mapping file should be created in the <library install directory>\python\bugzilla directory. By default, the defaultBzMapping.py file is used. For more details about structure of the library, please refer to the Python Client Library page.
  5. Import issues from a file to YouTrack running the following command:
    The following command line parameters should be provided:

    Parameter

    Description

    target_url

    URL of the YouTrack server to which data should be imported.

    target_login

    User name to log in to the target YouTrack server. Note that the user should have administrator permissions.

    target_pass

    Password to log in to the target YouTrack server.

    bz_db

    Name of the source Bugzilla database. By default, in Bugzilla if no specific changes were made, the name of database is bugs.

    bz_host

    URL of the source Bugzilla database.

    bz_port

    Port to access the source Bugzilla database. If not configured otherwise specifically, the port number for Bugzilla database is 3306, by default.

    bz_login

    Username to log in to the source Bugzilla database.

    bz_pass

    Password to log in to the source Bugzilla database.

    bz_product

    Name(s) of the source product to be imported from Bugzilla.

    Icon

    If no product name provided, all products in the database will be imported.

User accounts are imported from Bugzilla by user's email addresses. In YouTrack, an e-mail address a user provided in Bugzilla will be used as a login name for a user account. Passwords for newly imported (created) user accounts in YouTrack are randomly generated, that is: for the first login to YouTrack, a user should provide his e-mail address and then click the link Restore password to create a new password for his account.

By default, all data in Bugzilla is stored in cp866 encoding. If you have configured another encoding, then to import data to YouTrack correctly you will need to change the encoding parameter in your mapping file.

Mapping Notes

Mapping Bugzilla Statuses and Resolutions

Both Statuses and Resolutions are imported in YouTrack as issue state:

Bugzilla's STASUS

YouTrack's issue state

"UNCONFIRMED"

Open

"NEW"

"Submitted"

"ASSIGNED"

"Submitted"

"REOPENED"

"Reopened"

Bugzilla's RESOLUTION

YouTrack's issue state

"FIXED"

"Fixed"

"INVALID"

"Can't Reproduce"

"WONTFIX"

"Won't fix"

"DUPLICATE"

"Duplicate"

"WORKSFORME"

"Can't Reproduce"

"MOVED"

"Won't fix",

"LATER"

"Won't fix"

Mapping Custom Field Types in Bugzilla with YouTrack

Bugzilla's CF_TYPE (numeric)

Bugzilla's CF_TYPE

YouTrack's CF Type

"1"

FIELD_TYPE_FREETEXT

"string"

"2"

FIELD_TYPE_SINGLE_SELECT

"enum[1]"

"3"

FIELD_TYPE_MULTY_SELECT

"enum[*]"

"4"

FIELD_TYPE_TEXTAREA

"string"

"5"

FIELD_TYPE_DATETIME

"string"

"7"

FIELD_TYPE_BUG_URLS

"string"

Icon

Bugzilla's FIELD_TYPE_BUGID (numeric id - 6) will be imported to YouTrack as an issue link. If you prefer a different mapping, please define it manually in your configuration mapping file.