You are viewing documentation for the older version of YouTrack!

Skip to end of metadata
Go to start of metadata

Before you begin:


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

Importing Issues from Trac to YouTrack

Version compatibility note

Current implementation of the Python Client Library and scripts is compatible with YouTrack 3.x and 4.x REST API and Python 2.6. If you use YouTrack 2.x, please refer to YouTrack Release Downloads Archive for the YouTrack 2.x compatible versions of the library and scripts.

To import issues from Trac:

  1. Download the latest version of YouTrack's Python Client Library and unzip it.
  2. Create a mapping between Trac project and target YouTrack project. See sample mapping in the file.
  3. Import your mapping into By default, the mapping scheme will be used.
  4. From the Python Client Library installation directory, execute the following command:
    The following command line parameters should be provided:




    YouTrack URL


    YouTrack admin user login


    YouTrack admin user password


    YouTrack Project ID


    YouTrack Project Name


    the path to the Trac project

Mapping Notes

  • Importing Trac Users:
    There are two types of Trac users: registered users with a login and a password, and unregistered users who specified a name and an email address or a name only when creating or commenting the ticket.
    Registered users are imported to YouTrack with their original name and email. Unregistered users are imported only if an email address is provided. All the users without email address are imported as guest. If you would like to import all the unregistered users as guest (without creating an account in YouTrack), set ACCEPT_NON_AUTHORISED_USERS to False in the mapping scheme:
  • Visible to Group setting value is set to All Users for all the imported issues.
  • Component is transferred to Subsystem.
  • Owner is transferred to Default Assignee.
  • Versions = Fix Version
  • Type - configure the correspondence between the ticket Types in Trac and Issue Types in YouTrack in the mapping scheme. For example, the following mapping is used by default:
  • Time = Submitted Time.
  • Changetime = Last Updated Time.
  • Severity - if this attribute is used in the Trac project, the corresponding custom fields will be created in YouTrack with the matching set of values.
  • Priority - configure the correspondence between the Priority in Trac and Priority in YouTrack in the mapping scheme. The following mapping will be used by default:
  • Reporter = Reporter
  • Resolution and State are transferred to the single State field in YouTrack. Configure the correspondence between the Resolution and State values in Trac and State values in YouTrack in the mapping scheme. The correspondence between Resolution and State is checked first. By default, the following mapping is used:
  • Summary=Summary.
  • Description=Description.
  • Keywords are transferred to Tags.
  • Comments - comment text is imported along with the commenter's name.
  • Attachments = Attachments.
  • Custom fields - the description is taken from the trac.ini file along with the list of values, type and the default value. Appropriate custom fields are created in YouTrack while importing. The correspondence between the Trac custom fields type and YouTrack custom fields type is configured in the mapping scheme. The following mapping is used by default:
  • You can specify mapping between Youtrack issue fields and Trac issue fields. In order to define mapping, use FIELD_NAMES dictionary. In default provided mapping file, the following dictionary is defined:
  • Also, you can change target field types (field types in YouTrack) using FIELD_TYPES dictionary. In the default mapping file, the following dictionary is defined:

Note: the default custom fields type mapping is used in the import rules in Do not forget to update the import rules in your script when changing the mapping.