Can we get release information from checkedIN history.
we are using TFS 2012.
we have frequent release mostly on each week or on each 14 days.
Can we generate release document from TFS ?
(something like, based on TFS checked IN comments OR some how )
One way to do this would be to use Work Items (e.g. User Stories and Bugs) to generate your release notes.
But this requires your team to have the discipline to enter the information into TFS that allows it to associate work items with a release. For example:
Require developers to associate change sets with work items
Use fields such as "Iteration" or "Integrated in build" in work items to identify the release to which a work item belongs.
You could then create a suitable Team Query and export it to Excel to generate release notes.
I tend to use the Tf history command line tool to get information of changesets between two particular dates (or changesets). You can pass the /format:detailed parameter to get details such as changes involeed.
For example, the following will list all the changes between the 01/02/2014 & 24/04/2014 and write it to the history file.
tf history /noprompt * /recursive /v:D01/02/2014~D24/04/2014
/format:detailed > C:\history.txt
I like the TFS Changelog tool. Ready to use and easy to integrate.
TFS ChangeLog allows Team Foundation Server (TFS) users to extract information related to Changesets and associated WorkItems into XML format that is transformed into HTML.
All of these are nice tools, but there are a few things still missing I think.
These are technical notes (more like build / history notes) but actual release notes contain more customer friendly items
Not all of the information in TFS are wanted on the customer release notes (internally found bugs vs reported bugs)
As of now I use the TFS Community build manager to generate the technical build notes. It uses OpenXML and works fine for you build notes. It's even easy to create a custom word document for it.
For release notes we actually use the TFS User stories / tasks to be able to query on it. And for now, we create the document manually with the query results. We're looking into creating some tools that might do the following:
Run queries corresponding to the document paragrahs
We have a TFS template field indicating that the work item must be on the customer release notes (but we should change this to use 'special' iterations or so to eliminate the need of a custom field.
Automatically fill in the OpenXml placeholders in the document the same way as the build notes generator does.
Like the TFS Community Build Manager you could create a TFS Community Release Notes Manager that asks for query names and runs these queries to get to the required data.
The main question here is whether there are already tools that do this?
I know this is an old question, but perhaps you can use this task extension Generate Release Notes Build Task (for local TFS or as an extension to VisualStudio.com).
This extension is a build task you can use in build steps. This task generates a markdown release notes file based on a template passed into the tool. Here is an example of release notes output:
Release notes for build SampleSolution.Master
Build Number: 20160229.3 Build started: 29/02/16 15:47:58 Source
Branch: refs/heads/master
Associated work items
Task 60 [Assigned by: Bill ] Design WP8 client Associated change
sets/commits
ID bf9be94e61f71f87cb068353f58e860b982a2b4b Added a template ID
8c3f8f9817606e48f37f8e6d25b5a212230d7a86 Start of the project
Related
I am looking for a way to produce all TFS Work Items from a Jenkins promote job.
We have an on prem deployment of TFS with service hooks in place to build the corresponding applications on check-in. The changeset Id is included with the notification, but I need the TFS work item for that Changeset.
More importantly - we will have several builds run; each with a singular changeset before we actuall run the promotion job.
What I would like to do is find a way to produce the list of TFS work items between releases. Looking a plug-in or tool that will help produce this.
Update
You should first get the built changeset info in Jenkins side.
There seems to be a build.changeSets variable which could retrieve all the changeset.
Then you could directly use rest api in TFS to query work items info from changeset ID. Detail steps kindly take a look at here: How to retrieve work items associated to a build in jenkins with pipeline?
According to your description, seems you just want to get all work items between releases (for example: the current release and a previous release).
Retrieve work items by calling
https://{account}.vsrm.visualstudio.com/[teamproject]/_apis/Release/releases/{current release id}/workitems?api-version=4.1-preview.1&baseReleaseId={release id}
It just return the id, url of work items, and then you need to get details of work item through Get a list of work items REST API.
Is it possible to filter changesets in TFS 2012 to exclude the ones from a single user?
The commit history of the solution I currently work on contains quite a lot of noise due to an automated process making a commit each time a build is queued.
I'd like to filter it out to make the commit history more readable.
An alternative, try to install Team Foundation Sidekicks, and check History Sidekick. You can export the records to a .csv file and then filter the user in it:
There is no single query can achieve what you need. You may have to use TFS API.
If you want to get the changesets in a solution via TFS API. The folder history will be the simplest approach. Details please refer this: TFS client C# API - get all changesets of an Item You can exclude those changesets from the special user using Changeset.Committer Property which gets the user who committed the changeset.
We're using Team Foundation Service instead of a local TFS.
Our solution was created on Visual Studio 2012.
My problem is now that we want all assemblies to have the same version number (this part is already solved by using a CommonAssemblyInfo.cs that is linked into all projects).
The issue I'm facing right now is that we need the tfs changeset number at the last digit of the assembly version (e.g. 1.0.0.4711 where 4711 is the changeset number).
I've found several examples, but none of them worked for me.
And yes, I especially searched here on stackoverflow a lot.
I also have to admit that I've never looked into the MSBuild scripts...
Can anyone please give me a hint on how to accomplish this?
Is it for example possible to use the MSBuild Extension Pack on Team Foundation Service (not local TFS) and if, how to do that?
As always, time is my worst enemy...
Note that from 2010 Tfs employs Windows workflow for building the package the workflow calls msbuild for compiling the projects only - while its possible to pass changeset this way to msbuild its rather more hops.
Following deals with your problem, however the linked solution is more complex that needed:
Can assembly version been automatically updated with each TFS 2010 Build?
This is one of best series of tutorials on the custom build activities, the author is on stack as well i believe, one specificly about versioning
http://www.ewaldhofman.nl/post/2010/05/13/Customize-Team-Build-2010-e28093-Part-5-Increase-AssemblyVersion.aspx
In short you need a custom activity to run before compilation on source files, find all CommonAssemblyInfo.cs files, feed this list to your custom activity, it modifies the values inside with passed value of full version number or only the changeset and optionaly check in the change (probably not since your changeset will be out of sync then).
You can also take a look at https://tfsbuildextensions.codeplex.com/ set of activities there is TfsVersion activity among them, at the very least it will provide examples.
Functionality need for this should be available through Team Explorer and source control - The Custom activity assemblies and build templates usually are located in folder in your team project root - the location of this folder is defined for build controller you can change this through team explorer build section.
Changeset is available from value BuildDetail.SourceGetVersion, not sure if this was fixed/changed in 2012 however there were 2 issues about this value in 2010
Its doesnt respect GetVersion override in default build template - you will manualy need to update if override is used
When running latest build (no override) it will get the last changeset number from tfs - depending on your branches this may not be the same as 'last' changeset for the branch of build. You will either have to live with this, provide overrides for each build or implement activity that checks branch history for last changeset value and overrides it again.
It should be noted that GetVersion should be able to accept any sourcespec version - changeset, date, label etc. I havent played around with this enough to provide more details to you.
Colin Dembovsky wrote a great overview of doing version embedding using the new pre-build script setting in TFS 2013 build definitions.
The Changeset number is easily accessible within the pre-build process in the environment variable TF_BUILD_SOURCEGETVERSION. I was able to use this to embed the Changeset value in our binaries using a script based on Dembovsky's work above. (I used Perl, not powershell, so you probably don't want to see it ;-)
This approach doesn't require any changes to the build workflow which makes it a big win for me.
I've used Wintellect's solution - MSBuild-only, no TFS magic needed. I also added to the auto-generated CSharp file:
[assembly:AssemblyInformationalVersion("$(BuildNumber)")]
So I get the TFS build number.
Is there a way to look at code differential between previous and current versions of a changeset in TFS 2005/08 through a web-based interface?
I am aware of Changeset.aspx with a artifactMoniker parameter that retrieves the changeset and related files. But I would also like to view the code delta in a web based manner.
This can be achieved in TFS 2008 via the Visual Studio Team System Web Access.
First you need to open an individual Changeset details. This can be done for example by looking at a build (the Builds tab), and selecting one of the changesets associated with the build.
For some reason the version of Web Access I currently have at hand had a bug in that the link into a Changeset webpage is missing the changeset number. A quick manual fix of the URL helped.
This is the URL that is linked to
http://tfsappserver:8090/UI/Pages/Scc/ViewChangeset.aspx?changeseturi=vstfs:///VersionControl/Changeset/8695
Notice I needed to add the changeset parameter manually.
http://tfsappserver:8090/UI/Pages/Scc/ViewChangeset.aspx?changeseturi=vstfs:///VersionControl/Changeset/8695&changeset=8695
The page lists all the code files that has changed and for each file you can compare it with another version. The comparison option is available from dropdown menu on the file.
Here is what it looks like:
What would be the best method of automatically generating a Release Notes text file from a Team Foundation Server 2008 nightly build?
We created a TFS report that lists all Work Items associated with a specified Iteration (version). In addition we added a custom field to Work Items to indicate if we wanted the work item included in the release notes report. (Not all Work Items are appropriate for all clients/users.)
You could automate this process but you would need to specify the iteration in your build task. Or you could list every work item that has been completed as of a specific date.
I think the solutions here are describing "build notes". If you want that, you really need to checkout the TFS Community Build Manager. It has a feature to generate build notes in Word files by using the OpenXML. It's clicking the VSIX and you're done.
But imho, build notes are not release notes. Release notes provide a more customer friendly way of listing you changes. And you need to be able to specify what work items you want in the notes, and the ones you don't want your customer to see. So for that, I have created a custom Team Explorer add-in. And it does more or less what the build manager does as to generating the OpenXML Word.
I use queries to define what the bugfixes are, what new features are available, ... and then the team explorer extension provides the GUI to specify the document fields (Title, descriptions, remarks, ...) and to select the queries corresponding to the blocks on the release notes. After filling in the details, the word document gets generated. I can provide with all the details if you want.
UPDATE:
I uploaded a sample xsl file for transforming the buildlog.xml to get an informative plain releasenotes.txt. Get it here: Automatically generate release notes textfile from Team Foundation Build
That one is actually pretty easy. Grant Holliday describes it on his blog. It basically goes something like this:
Install MSBuild Community Tasks (which contains the WebDownload Task)
Install MSXSL.exe from Microsoft (for transforming xml files)
Extend the tfsbuild project with information regarding the retrieval of the buildlog.xml (using WebDownload task) and transformation with MSXSL.exe
However, you need to download the MSBuild Community Tasks directly from tigris and not use the link provided in this blog post. This is due to the fact, that the link refers to the wrong version which does not support the UseDefaultCredentials options (that you need for the MSBuild Task to be able to connect to the proper TFS Webservice).
Here is the link to the article:
Building a release notes text file with team build
I got everything working except for the xsl file, because unfortunately, Grant does not offer a sample xsl. If you manage to create a proper xml transform file that fits your needs, it would be awesome if you can send me a copy. ;-)