Have you ever wanted to integrate your Subversion repository with your MantisBT so that your Subversion commit messages update the bug(s) they relate to? This article will describe this feature and how to enable it on your devZing account.
Some of the features are:
- The ability to link changesets to issues and the users that created them
- Automatic resolving or manipulation of issues depending on commit messages
- The ability to intelligently map repository branches to project versions in the tracker
For instance, when I commit a bugfix to my repository’s “master” branch, if the commit message says “Fixes issue #17”, the tracker can automatically mark issue #17’s fixed in version “1.3.x”, the current development version.
Once the repository and commit data has been imported into MantisBT, it can be browsed or searched, and each changeset is automatically link the committing user.
There are 4 steps to enabling this functionality
- Configure the repository
- Install the Plugin
- Configure the Plugin
- Import the repository
Configure the Repository
MantisBT needs a valid Subversion user for the repository you are about to configure. This user should have read permissions for the repository. You can manage your Subversion users by logging into your devZing account at https://devzing.com/login and clicking Subversion.
Install the Plugin
Log into your MantisBT with a user that has administrator access level.
Navigate to Manage then Manage Plugins.
Scroll down until you see the Source Control Integration plugin
- Click Install
Scroll down again until you see Subversion Integration
- Click Install
You have now installed all the plugins required.
Configure the Plugin
On the Manage Plugins page click the Source Control Integration link to bring up the general configuration page.
Scroll down until you see the field labeled “API Key”
Enter the word: devzing
All the way at the bottom
- click Update Configuration
After the installation, You will have a new link in your MantisBT Menu, named “Repositories” click the link.
You need to tell MantisBT what repository you want to use for the integration.
- Fill in the “Create Repository” form,
Name – required (should be the name of your Subversion repository – exactly, not the URL, just the name)
Type – choose SVN
- Click “Create Repository”
You’ll be taken to a second form with a new set of options based on the repository type chosen. Fill in the form
Name- required (should already be filled in)
URL- required (this is the URL for your repository it can be found on the Manage Repositories screen from above)
SVN Username- required (this is a valid Subversion user that you have set up with at least read privileges)
SVN Password- required
Leave “Standard Repository” checked
- Click “Update Repository”
Import the Repository
The last step is to bring in all the data from the Subversion repository. If the repository is new or doesn’t have many commits this process is quick. For a larger existing repository this could take many minutes and you may have to run this process more than once to get it all.
- To begin with the repository import process, click “Import Latest Data” link
- A window to confirm importing process will appear, click on “Import Latest Data”
You will see a message showing you the import results when complete.
From now on devZing will automatically add new changesets to your MantisBT every time you commit to the configured Subversion repository.
In addition to the changesets showing up in MantisBT you can add information to your commit message to automatically resolve the bugs related to the commit.
Just include “fixed #101” in the commit message and issue 101 will be marked as fixed and resolved. You can include multiple issues separated by commas – “Fixed #101,#123”