You are not logged in. Click here to log in.

codebeamer Application Lifecycle Management (ALM)

Scheduled maintenance 2023.06.01. 07:30 CET

Search In Project

Search inClear

Tags:  Mantis

Importing Data from Mantis to CodeBeamer

The Mantis Importer tool has been developed for importing bug data from existing Mantis 0.14+ Bugtracking databases into a CodeBeamer 4.2+ installation.

This tool is a stand-alone Java application which uses the CodeBeamer Web Service API to remotely connect to a CodeBeamer server. You can run the tool using a 1.4 or newer Java Runtime Environment.

Migrated Mantis Data

The following Mantis objects are migrated:

  • users (the password cannot be migrated and defaults to "changeme"),
  • projects, including
    • project members,
  • bugs, including
    • custom fields,
    • history,
    • attached files,
    • bugnotes,
    • relationships,
    • monitors
  • news

Only Mantis user profiles and preferences cannot be migrated, because CodeBeamer has a different concept.

Mapping Mantis Codes to CodeBeamer Choices

The Mantis data to be migrated is extracted directly from a Mantis database.

Unfortunately, not all required information is stored in the Mantis database.

The following available values and display text are missing:

  • access_level (mantis_project_user_list_table)
  • priority (mantis_bug_table)
  • severity (mantis_bug_table)
  • reproducibility (mantis_bug_table)
  • status (mantis_bug_table)
  • resolution (mantis_bug_table)
  • projection (mantis_bug_table)
  • eta (mantis_bug_table)

These Mantis code to CodeBeamer choice (name plus optional code) mappings have to be provided separately in a properties file (default:

Restrictions on Mapping

Mantis access_level can only be mapped to the default CodeBeamer project roles:

  • Customer,
  • Stakeholder,
  • Developer - Extern,
  • Developer - Intern,
  • Project Admin.

The Mantis bug priority must be mapped to one of the predefined CodeBeamer priorities:

  • 1=Highest,
  • 2=High,
  • 3=Normal,
  • 4=Low,
  • 5=Lowest

The Mantis bug status can be mapped to a predefined CodeBeamer status

  • 1=Unconfirmed,
  • 2=New,
  • 3=Reopened,
  • 4=Resolved,
  • 5=Verified,
  • 6=Closed,
but it is also possible to define additional status values. In any case, the status representing closed bugs must have the value 6.

In CodeBeamer, the estimated time to achive (ETA) is measured in explicit hours, not in a category as in Mantis. Therefore Mantis eta values must be mapped to hours.

Finding the Importer

The Mantis importer is bundled together with the Bugzilla importer in a codebeamer_importers_<release>.zip archive, that you can find in the directory


of your codebeamer installation.

To install, simply unpack the ZIP archive and then go to the mantis subdirectory.

Running the Importer

Specify the connection to the source Mantis database in the file before running the import script. Set the values for the database driver, url, username and password.

Please note, that the Mantis importer distribution only includes a MySQL database driver. Drivers for other databases have to be provided by the customers themselves.

You will also have to review/set your choice field mappings in the default file. You can also create your own custom version of this mapping file.

The source Mantis database instance and the target CodeBeamer server instance must be up and running and reachable from the host where the import script is executed.

To start the import, issue the following command:

mantis-import <service-URL> <username> <password> [choice-mapping-file]

Where <service-URL> is the URL of the target CodeBeamer server (e.g., and <username> and <password> are the name and password of the CodeBeamer user who executes the import.

The 4th parameter is optional. It is the name of a custom choice mapping file to use. If not specified, is used.

For example:

mantis-import http://localhost:8080/cb/remote-api bond 007

The import script displays status messages about the import progress on the console, and also writes a MantisImporter.log file.

This log file is helpful when you need to know the mapping of the old Mantis bug IDs to the new CodeBeamer bug IDs.