|
CruiseControl.NET : IssueUrlBuilder
This page last changed on Sep 29, 2008 by williams.
This addition to the sourcecontrol provider allows easy linking with an issue tracking system like Jira, Gemini, Bugzilla, ...
Configuration :This must be placed inside the sourcecontrol block.
<issueUrlBuilder type="defaultIssueTracker"> <url>http://jira.public.thoughtworks.org/browse/CCNET-{0}</url> </issueUrlBuilder> There are 3 types :
TypesdefaultIssueTrackerFor the defaultIssueTracker there is 1 element needed : url It contains the url of the involved project, with the issue number as a parameter :{0} Whenever a checkin is done, the following logic is applied :
ex.: with the mentioned configuration the following comments will be converted into http://jira.public.thoughtworks.org/browse/CCNET-1223
Example :
<issueUrlBuilder type="defaultIssueTracker"> <url>http://jira.public.thoughtworks.org/browse/CCNET-{0}</url> </issueUrlBuilder> regexIssueTrackerFor the regexIssueTracker there are 2 elements needed : find and replace Example :
<issueUrlBuilder type="regexIssueTracker"> <find>^.*(CCNET-\d*).*$</find> <replace>http://jira.public.thoughtworks.org/browse/$1</replace> </issueUrlBuilder> For the ones not familiar with regular expressions : find statement : Assert position at the beginning of the string «^» replace statement: replace with http://jira.public.thoughtworks.org/browse/backreference1; «$1»
multiIssueTrackerThis issue tracker allows a combination of the other issuetrackers. Example :
<issueUrlBuilder type="multiIssueTracker"> <issueTrackers> <defaultIssueTracker> <url>http://jira.public.thoughtworks.org/browse/CCNET-{0}</url> </defaultIssueTracker> <regexIssueTracker> <find>^.*(CCNET-\d*).*$</find> <replace>http://jira.public.thoughtworks.org/browse/$1</replace> </regexIssueTracker> </issueUrlBuilder> This will first apply the default issueTracker on the comment, and afterwards the regexIssueTracker, overwriting a previous result.
|
| Document generated by Confluence on Mar 14, 2009 02:55 |