Generate Release notes with changesets and adding of custom fields in WorkItems

Jun 3, 2013 at 4:53 PM
This seems like a great tool but at this point in time. As we haven't even had a first cut of release yet, we are not using branches yet in TFS. Is there a way to generate report without having branch? I see in the previous posts you mentioned all one needs to do is change the xslt to include changeset? Could you provide an example, so I have an option to include/exclude changesets in the release notes report?

I am very happy to see that in the post below, there is a way to create custom fields to work items so that developers can populate "Release Notes" information. Could you show me an example how to achieve that? I assume this requires changing the TFS process template?
Jun 10, 2013 at 2:19 PM

It's true that current version of TFSChangeLog application does not generate report based Folder and it does need BRANCH selected for it. This is something we are going to change in future as we have this requirement in our back-log to support generation of report based on Folder selection. For now, I can only suggest that you introduce "MAIN" branch in your structure. You don't have to create sub branches like Integartion / Dev / Release etc. Just having "Main" branch would be sufficient.

NOTE: Before you perform following step take a back-up of your “C:\Program Files (x86)\TFSChangeLog\ReleaseNotesTemplate.xslt” file.

Secondly, I have produced few extra XSLT templates that you can use in your release notes generation process. They are now uploaded in the source code repository and can be downloaded from Please note that to apply any of the given XSLT template, you will have to rename it to “ReleaseNotesTemplate.xslt” and copy it in the “C:\Program Files (x86)\TFSChangeLog\” directory. Basically, you are replacing existing template with the new one.

Thirdly, Yes, it’s true that you can introduce Custom Fields in TFS via Process Template customization. There are many books and online Blogs that describe how to change TFS WorkItems on a given project and in a given process template. To facilitate this, Microsoft has also provided us with TFS PowerTools that has Process Template Editor.

Once you have introduced custom field in your process template then that field will automatically get published in the base XML file when you generate Release Notes report via TFSChangeLog application. This XML base file is present in at … “C:\Users[USER_ID]\AppData\Local\TFSChangeLog\”. You will have to then modify your base “C:\Program Files (x86)\TFSChangeLog\ReleaseNotesTemplate.xslt” file to be able to include such custom fields in your final HTML output. XSLT is not that difficult and again there are lot’s of online documents and help available. If you find it difficult then just send me simple example of your XML file and let me know what you want to see in your HTML report. I will try to modify base XSLT and provide you with yet another one that you can try in your environment.

Hope this helps!

Best Regards,
TFSChangeLog Team.
Jun 11, 2013 at 12:58 PM
Thanks for making the templates available. They are very useful.
I think the one most informative in is the "ReleaseNotesTemplate - ChangeSetAndChildWorkItems" xslt template.

One thing I want to achieve though is to generate the release notes report not as html, but like a normal TEXT file.
I tried using the "ReleaseNotesTemplate - HTML_to_Text_Description" xslt template but I am still getting the html report.
Have I made the wrong assumption about what this xslt does? i.e. generating a Text report?
If so, is there a way to generate a simple text format report?
The main reason for this is the ease of editing and merging release notes

The other question I was asked is that when we end up with different branches, will the changeset tool be able to get changesets/workitems from work done on other branches? A simplified scenario would be like this
A feature request is done in Dev, which merged into Main and then merged down to Release
If we run the tool on the Release Branch, would it be able to pick up the changeset done in Dev?
Jun 11, 2013 at 1:54 PM
Hi Brianyu,

In TFS 2010, description box was a simple text box and so it was easy to report it out as text.

In TFS 2012, description box is now HTML box and when you use default "ReleaseNotesTemplate.xslt" file that is bundled with installer then it does not convert HTML content to plain text. But "ReleaseNotesTemplate - HTML_to_Text_Description" is designed to convert description content from HTML to plain text (NOTE IT'S JUST DESCRIPTION BOX THAT IS COVERED BY THIS TEMPLATE. You will have to modify XSLT file to cover other fields that are of type HTML in TFS).

Regarding walking through different branches, It's bit tricky and does require more work to be done on the current version of TFSChangeLog. It does not support this feature for now. If you would like to see this feature implemented in future then I suggest that you cast you vote to this very same request that came from another user that can be found at

Best Regards,
TFSChangeLog Team.
Jun 11, 2013 at 2:04 PM
Thanks for getting back to me so quickly. yes I have casted my vote on the feature request.

We are still using TFS2010 so it's a plain text field for now.
We will be migrating to TFS2012 in the next month or two so this will be handy.

Sorry to ask again but is there a quick and easy way to generate the whole release notes report as a TEXT file?
I prefer html but others want a text file for easy editing/merging.
Jun 12, 2013 at 12:57 PM

If you take out all HTML tags from the XSLT file then it shows output in textual format. But, in TFSChangeLog application, it's hard coded right now to SAVE output as .HTML file. If you simply rename this output file to .txt then you will see it fine in Notepad.

Following is an example XSLT code snippet.
<xsl:stylesheet version="2.0" xmlns:xsl="" xmlns:xs="" xmlns:fn="">
    <xsl:output method="text"/>
    <xsl:template name="removeHtmlTags">
        <xsl:param name="html"/>
            <xsl:when test="contains($html, '&lt;')">
                <xsl:value-of select="substring-before($html, '&lt;')"/>
                <!-- Recurse through HTML -->
                <xsl:call-template name="removeHtmlTags">
                    <xsl:with-param name="html" select="substring-after($html, '&gt;')"/>
                <xsl:value-of select="$html"/>
    <xsl:template match="/ChangeLog">
        <xsl:text>Release Notes Generated from TFS - TFS Change Log Report</xsl:text>
        <xsl:text>TFS Server : </xsl:text>
        <xsl:apply-templates select="TFSServer/node()"/>
        <xsl:text>Project Name : </xsl:text>
        <xsl:apply-templates select="TFSProjectName/node()"/>
        <xsl:text>Branch Location : </xsl:text>
        <xsl:apply-templates select="TFSProjectBranchName/node()"/>
        <xsl:text>Report Produced By : </xsl:text>
        <xsl:apply-templates select="ReportProducedBy/node()"/>
        <xsl:text>From Changeset : </xsl:text>
        <xsl:apply-templates select="FromChangeSet/node()"/>
        <xsl:text>To Changeset : </xsl:text>
        <xsl:apply-templates select="ToChangeSet/node()"/>
        <xsl:text>Total Number of Changesets : </xsl:text>
        <xsl:value-of select="count(distinct-values(/ChangeLog//ChangeSet/ID))"/>
        <xsl:text>Total Number of Work Items : </xsl:text>
        <xsl:value-of select="count(distinct-values(/ChangeLog/ChangeSets//WorkItems//WorkItem/_ID))"/>
        <xsl:text>Changesets with associated Work Items : </xsl:text>
        <xsl:value-of select="count(/ChangeLog//ChangeSet[WorkItems/WorkItem/_ID[1] > 0])"/>
        <xsl:text>Changesets without associated Work Items : </xsl:text>
        <xsl:value-of select="count(distinct-values(/ChangeLog//ChangeSet/ID)) - count(/ChangeLog//ChangeSet[WorkItems/WorkItem/_ID[1] > 0])"/>
        <xsl:text>Report Date : </xsl:text>
        <xsl:apply-templates select="ReportDate/node()"/>
        <xsl:for-each select="//WorkItem[not(preceding::WorkItem/_ID=./_ID)]">
            <xsl:sort select="_WorkItemType"/>
            <xsl:sort select="_ID" order="ascending"/>
            <xsl:text>Work Item ID : </xsl:text>
            <xsl:apply-templates select="_ID"/>
            <xsl:text>Work Item Type : </xsl:text>
            <xsl:apply-templates select="_WorkItemType"/>
            <xsl:text>Status : </xsl:text>
            <xsl:apply-templates select="_State"/>
            <xsl:text>Title : </xsl:text>
            <xsl:apply-templates select="_Title"/>
            <xsl:text>Assigned To : </xsl:text>
            <xsl:apply-templates select="_AssignedTo"/>
            <xsl:text>Description : </xsl:text>
            <xsl:if test="exists(_Description)">
                <xsl:variable name="PlainTextualDescription">
                    <xsl:call-template name="removeHtmlTags">
                        <xsl:with-param name="html" select="_Description"/>
                <xsl:value-of select="$PlainTextualDescription" disable-output-escaping="no"/>
XSLT is very powerful and it can generate output in many different formats from the base XML file. This is the main reason why we chose to use XSLT.

Best Regards,
TFS ChangeLog Team.
Marked as answer by Dharmesh_Shah on 10/15/2013 at 4:34 AM
Jun 14, 2013 at 9:06 AM
Thanks for getting back to me and showing me a way to generate text output.
I managed to generate a TEXT version of the release notes and it looks pretty cool, currently waiting for feedback.

My next step is to look at the TFS work item template and see if i can add the "Release Notes Comments" field.
If you could point me to any wiki or even an example on how it's done, that'll be great. I have changed the work item template before so i am reasonably comfortable with the concept.

Please see below an example of release notes our team used before.
I believe we have the "Changesets" section covered already by your report and the "Summary" section is the "Release Notes Comment"
Q) is there a way to add a hyperlink to the "Changesets" section so people can click on it and see the changeset details?
Q) Could the "Released" Section be ever automatic? or best to do it manually?

=============================================================================================================1.0.0 (01/06/2013)

  • Connect to Third party vendor xXX
  • Fix in generating report
[ ] Clients
[X] App Servers
[ ] DB

[Changeset 20178] 03/05/2013 08:05:33 brianyu [hyperlink to the work item] TFS work item info in text

[Changeset 20176] 03/05/2013 08:05:33 brianyu [hyperlink to the work item] TFS work item info in text

Jun 14, 2013 at 2:06 PM

I will recommend you to have a look at It has detailed explanation about how to customize Process Template. PLUS have a look at Team Foundation Server Power Tools which is installed in your Visual Studio and it allows you to visually edit your process template and workitems within it.

Let me answer following questions inline...

Q) is there a way to add a hyperlink to the "Changesets" section so people can click on it and see the changeset details? - This is not supported in current version but it's something we should investigate. This feature will be useful for projects that are building software for internal company use. But for software that is developed for external customer, such a release notes hyperlink will not be helpful as customers will not be able to connect to your TFS and WorkItems wihtin it.
Q) Could the "Released" Section be ever automatic? or best to do it manually? - Currently, the best way is to do it manually. There are some thoughts that I have but it's difficult to explain that over such communication.

Best Regards,
TFSChangeLog Team.
Marked as answer by Dharmesh_Shah on 10/15/2013 at 4:34 AM