Before we start how can we integrate Bug tracking System with our SVN repository I just want to clarify few points.
Ans - Widely accepted source code management tool.
Ans - A bug tracking system is a software which tracks tasks/issues/bugs which needs to be done/fixed for a application. Example: JIRA is a commonly used bug tracking system.
Ans - SVN tracks the code modification by different user for an application. During code commit into the SVN repository we add some description about the changes but sometimes we need some more information about the changes like who has assigned this changes to Application engineers.
So, to find out full description we integrate BTS with SVN code commit and it will keep BTS task/bug ID with your code commit for future reference.
Lets go to next step:
System Requirements:
Steps to integrate BTS in your SVN Project:
BTS will be integrated in your local copy. You don’t have to anything any changes in your SVN repository. When you will add a BUG id, it would be saved in your SVN commit statement.
You can right click on the project folder which already committed into SVN and you can see the following option(as shown below):
Click on Properties then you will see another screen below:
Now, click on “New” then “Bugtraq” then you will see another screen as below:
This is the main screen for setting the BTS. Lets review different input fields which we needs to filled up.
Here, %BUGID% defines the bug ID. So, my sample BUG URL is :
2. Remind me to Enter a bug-ID: This check box defines during your code commit it will remind you to insert Bug ID if you have not entered any bug ID.
3. Message Pattern: This field specifies how you want to show your bug ID in SVN log. You must have to specify the “%BUGID%” in that pattern. I want to see my Bug ID as :
Task ID: YMLS-645 in the commit statement.
If this property is set, then TortoiseSVN will provide an input field to insert bug ID. It's used to add a line at the end of the log message.
4. Message Label: This text is shown by TortoiseSVN on the commit dialog to label the edit box where you enter the issue number. If it's not set, Bug-ID / Issue-Nr: will be displayed. Keep in mind though that the window will not be resized to fit this label, so keep the size of the label below 20-25 characters.
I have set it as Task ID to show in my commit window as well as in the SVN logscreen.
5. Bug-ID is: Select whether your BUG/Task ID is an arbitrary text or some number value.
6. Insert Message At: This property defines if the bug-ID is appended to the end of the log message or inserted at the start of the log message
Next field sets are present under “Regular Expression” label. If we will setup regular expression then TortoiseSVN doesn't show a separate input field for Bug ID input but marks the part of the log message the user enters during code commit which is recognized by the issue tracker. This is done while the user writes the log message during code commit. So, this is not required for us.
Next field sets are “IBugTraqProvider”. These fields are required to get bug information from the BTS application. We don’t require these fields.
After all setup check “Apply property recursively” checkbox. So that it will be applied all the sub folders of your project. Then click on OK.
After that make some changes and try to commit your code and you will see a screen like below.
Here, you can see a “Task ID” input field at the right upper corner where I have entered my Bug ID. Also, I have entered my log message for the code which I am going to commit.
Now, lets see the svn log.
You can see a new field called “Task ID” in the log message which stores the Bug/Task ID. If you look into the log message you can see some text “Task ID: YMLS-647” is added automatically and this YMLS-647 is exactly a link to that particular Bug details. If you click on that it will take you to that particular Task/Bug.
Hope this article will help you to integrate BTS in your SVN. For more details please go to the following reference: