Ensure REST API is enabled in the target YouTrack installation before starting import process. This setting is located on Administration > Settings screen (http://<your YouTrack instance>/settings).
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.
Important notes
About sub-projects
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.
About user accounts
Please note that YouTrack does not support importing usernames with spaces. For such usernames the space sign will be replace with the underscore ("_") sign.
About encodings
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.
Mapping Notes
All mappings except Custom Fields, could be edited, if needed.
Mapping Mantis's RESOLUTION and STATUS
Both Statuses and Resolutions are imported in YouTrack as issue state:
Mantis RESOLUTION
YouTrack State
10 (open)
"Open"
20 (fixed)
"Fixed"
30 (reopened)
"Reopened"
40 (unable to reproduce)
"Can't Reproduce"
50 (not fixable)
"Won't fix"
60 (duplicate)
"Duplicate"
70 (no change required)
"Obsolete"
80 (suspended)
"Incomplete"
90 (won't fix)
"Won't fix"
Mantis STATUS
YouTrack State
40 (confirmed)
"Verified"
Mapping Mantis's PRIORITY, STATUS, and LINK TYPES
Mantis PRIORITY
YouTrack Priority
10 (none)
"0" (Minor)
20 (low)
"0" (Minor)
30 (normal)
"1" (Normal)
40 (high)
"2" (Major)
50 (urgent)
"3" (Critical)
60 (immediate)
"4" (Show-stoper)
Mantis LINK_TYPES
YouTrack's Link type
0 (duplicate of)
"Duplicate"
1 (related to)
"Relates"
2 (parent of)
"Depend"
Mapping Mantis's REPRODUCIBILITY and SEVERITY
Both REPRODUCIBILITY and SEVERITY attributes are imported to YouTrack as new custom fields of enum[*] type with the same names.
Mantis REPRODUCIBILITY
Reproducibility in YouTrack
10
"Always"
30
"Sometimes"
50
"Random"
70
"Have not tried"
90
"Unable to reproduce"
100
"N/A"
Mantis SEVERITY
Severity value in YouTrack
10
"Feature"
20
"Trivial"
30
"Text"
40
"Tweak"
50
"Minor"
60
"Major"
70
"Crash"
80
"Block"
Mapping Custom Field Types in Mantis with YouTrack