|Before you begin:|
- Importing Issues from Mantis to YouTrack
- General Procedure
- Mapping Notes
To import issues from Mantis bug tracker:
- Download the latest version of YouTrack's Python Client Library and unzip it.
- Install Python.
- Install Python library mySQLdb
- If needed, create a new mapping file to set the correspondence between source fields in Mantis and YouTrack issue's attributes. This mapping file should be created in the <library install directory>\python\mantis directory. By default, the defaultMantis.py file is used. For more details about structure of the library, please refer to the Python Client Library page.
- 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. mantis_db Name of the source Mantis database. mantis_host URL of the source Mantis database. mantis_port Port to access the source Mantis database. If not configured specifically, the port number for Mantis database is 3306, by default. mantis_login Username to log in to the source Mantis database. mantis_pass Password to log in to the source Mantis database. mantis_project Name(s) of the source projects to be imported from Mantis.
If any Mantis project to be imported has one or several sub-projects, all of them are imported as a single project in YouTrack. If you want to distinguish issues of different sub-projects, you should specify the CREATE_CF_FOR_SUBPROJECT parameter in your mapping file. If this variable is enabled, then for all issues in the target YouTrack project a new custom field "Subproject" will be created. As a value of this custom field, the name of a subproject will be set. For issues from the main project, the Subproject custom field will be set as Undefined.
Please note that YouTrack does not support importing usernames with spaces. For such usernames the space sign will be replace with the underscore ("_") sign.
By default, all data in Mantis is stored in cp866 encoding. If you have configured another encoding, then to import your data to YouTrack correctly, you need to change the encoding parameter in your mapping file.
All mappings except Custom Fields, could be edited, if needed.
Both Statuses and Resolutions are imported in YouTrack as issue state:
|Mantis's CF_TYPE (numeric)||Mantis's CF_TYPE||YouTrack's CF Type|
You can specify additional mapping between YouTrack issue fields and Mantis issue fields. To define additional mapping, use FIELD_NAMES dictionary. In default provided defaultMantis.py 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: