MantisBT integration for issues
Issues of Meliora Testlab’s projects can be integrated with MantisBT issue tracker which allows for realtime one-way integration. In this scenario, MantisBT acts as a master repository for your project’s issues.
How it works
When integrated to MantisBT, the MantisBT is a master repository for issues. All issues are added to MantisBT and the changes of the issues are replicated back to Testlab with a polling protocol. As the data for issues is replicated back to Testlab, it allows you to do real-time analysis and reporting against your project’s issues in Testlab. The links between Testlab’s and MantisBT’s issues are maintained in Testlab’s database.
When configured for this issue tracking integration, the behavior of Testlab’s user interface is changed as follows:
- For fields pushed from MantisBT, Testlab’s editing views become read-only. Fields not mapped from MantisBT are still editable in Testlab.
- When adding a new issue, the user is automatically transferred to MantisBT to add the new issue. When returning, the user is asked for the MantisBT bug identifier and when entered, the issue is fetched from MantisBT and added to Testlab’s database.
- An existing bug in MantisBT can also be linked to Testlab. When done so, the user is asked for the bug ID and the corresponding bug is then fetched from MantisBT and added to Testlab’s database.
- When viewing an issue, the view contains a button which can be pressed to easily open up the issue in MantisBT.
- When commenting on an issue, the user is automatically transferred to MantisBT to add the comment.
As a background job, MantisBT is polled periodically for any changes in the bugs. By default, this happens once per every 5 minutes.
- When polled, the data for all bugs already linked in Testlab are fetched and their data is refreshed in Testlab’s database.
- If the integration is configured to delete the removed issues from Testlab, all bugs which seem to be deleted from MantisBT are also deleted from Testlab.
For details on what data is synced exactly, please see below.
- You are using MantisBT and the MantisBT is accessible over the network. This means, that your MantisBT must be accessible from the server(s) Testlab is running on.
- MantisBT must have the REST API enabled and must be in recent enough version for the REST to be supported.
How to get started
To get started with integration follow the steps described below. If you have questions about these instructions or any problems with the set up please feel free to open up a support ticket in Testlab. We are happy to help you with your setup!
1. Preliminary configuration for MantisBT
Enabling the REST API
Continue on to instructions on how to set up the Testlab project to be integrated with MantisBT.
Integrate Testlab project with MantisBT
For all Testlab projects which you prefer to integrate with your MantisBT, some configuration steps need to be taken.
- Log on to your Testlab (preferably as an administrator to make sure you have the needed permissions for the configuration) and select Testlab > Manage projects…
- Select the project you want to integrate with your MantisBT.
- Choose the Integrations tab, Click Edit and as an Issue tracker, choose “MantisBT” and enter the following:
- MantisBT URL: http://my.mantis.com/
Absolute root URL of the MantisBT you are integrating the project with. This is typically the address you access your MantisBT with your browser.
- API token: your MantisBT API token
The API token in your MantisBT you set up earlier. Make sure to copy and paste the API token exactly as it is set up in your MantisBT.
- Statuses: status mappings
Defines how the Bug statuses you have in your MantisBT are mapped to Testlab’s issue workflow statuses. The mappings can be used to map the statuses between the systems if the workflow statuses in your Testlab does not match the statuses in your MantisBT. The default values are provided to match default values from MantisBT to Testlab’s default issue workflow.
The mappings are optional: If a status in your MantisBT is not mapped, by default, the integration tries to match the status to identical status in your Testlab’s workflow. The comparison is made in a case-insensitive manner by comparing the labels of the statuses.
- Severities: severity mappings
Similarly to the statuses, this option defines how the Bug severities in your MantisBT are mapped to Testlab’s severities. The default values are provided to match default values from MantisBT to Testlab’s defaults.
- Priorities: priority mappings
Similarly to the statuses, this option defines how the Bug priorities in your MantisBT are mapped to Testlab’s priorities. The default values are provided to match default values from MantisBT to Testlab’s defaults.
- Resolutions: resolution mappings
Similarly to the statuses, this option defines how the Bug resolutions in your MantisBT are mapped to Testlab’s priorities. The default values are provided to match default values from MantisBT to Testlab’s defaults.
- Delete linked issues removed from MantisBT?: yes or no
If checked, the issues replicated to Testlab which are removed from MantisBT are also removed from Testlab’s database.
- Click “Verify Configuration” button to check that your MantisBT settings are valid. We will try to contact your MantisBT from the address provided with the API token credentials by calling the REST API.
- Click Save and you are done.
- To verify that the integration works as expected
- In Testlab, change your project to the one you integrated with if you are not already logged on to it, go to Issues view and click Add issue…
- Choose to Add a new issue in your MantisBT and a new browser window should open up which points to your MantisBT. Log in if needed, and enter some issue details for testing. Add and save a new issue to your MantisBT.
- Change view back to Testlab and enter the ID of the bug just added. Testlab should now fetch the issue from MantisBT and it should be visible in the Issues view in Testlab.
Default mappings of data between MantisBT and Testlab
When configured, the integration will map the MantisBT fields to Testlab’s issues as:
||Testlab field (or assets)
|Description + Steps to reproduce + Additional information
When mapping the data, the following logic is respected:
- When mapping users (such as Reporter to Testlab’s assignee), the mapping is done primarily by the e-mail address provided by Mantis and if this fails, by the user name. For the field to be mapped correctly, a matching user should be found in Testlab by going through the project’s users.
- All public notes from MantisBT are replicated to Testlab as comments.
- All attached files from MantisBT are replicated as attachments to Testlab.
Frequently asked questions
In short – what exactly does this do?
You can integrate your MantisBT issue tracker in a way, in which bugs are created and updated in MantisBT and pushed to your Testlab project as issues. Issue fields which are pushed from MantisBT cannot be edited directly in Testlab but fields, which are not pushed (such as targeted milestone, related test case, etc) can still be edited in Testlab.
Does this work with my MantisBT installation?
Most likely, if
- your MantisBT is network accessible from Testlab server(s),
- your MantisBT is recent enough to support REST and has the REST API enabled.
From where exactly do I set this up with?
Log in to your Testlab project, select Testlab > Manage project(s)… and choose the Integrations tab. All integrations which can be taken in use by yourself are configured per project from this view. Check the pre-requisites and follow the instructions above in this document to set up the integration.
I’m using custom workflows, how exactly can I set them up?
It is a good idea to have the same workflow statuses for assets in both Testlab and MantisBT. This way the statuses map to each other (with no need to map them by hand) and for users, this is most likely the most intuitive way to work with issues anyway.