How to get the work items by a ChangeSet ID from TfsWorkItemTracking database?  
Author Message
BillWang





PostPosted: Team Foundation Server - General, How to get the work items by a ChangeSet ID from TfsWorkItemTracking database? Top

Hi all,

I want to build a "What Is New" page on my internal development web site. The page will list the ChangeSet and the work items relative the changeset.

How can I get the work items by a ChangeSet ID from TfsWorkItemTracking database

Thank a lot

Bill



Visual Studio Team System1  
 
 
Luis Fraile





PostPosted: Team Foundation Server - General, How to get the work items by a ChangeSet ID from TfsWorkItemTracking database? Top

Going directly to the database is not recommended and supported by Microsoft, but to do what you wahnt, you can use the version control object model, which allows you to get the items you want, without any problem, you can find more info and docs about this in the Visual Studio 2005 SDK.



 
 
BillWang





PostPosted: Team Foundation Server - General, How to get the work items by a ChangeSet ID from TfsWorkItemTracking database? Top

I didn't find the Version Control Object Modal from my VS 2005 SDK.

Where is the Microsoft.TeamFoundation.WorkItemTracking namespace document and library


 
 
Luis Fraile





PostPosted: Team Foundation Server - General, How to get the work items by a ChangeSet ID from TfsWorkItemTracking database? Top

The library you must have it directly in the list when adding new reference to project, about documentation you must have in "Visual Studio Team System Integration" folder on SDK, and also check it on MSDN2, and this forum and bloggers.

 
 
eugene.z





PostPosted: Team Foundation Server - General, How to get the work items by a ChangeSet ID from TfsWorkItemTracking database? Top

G'day,

Using object model it will be quite simple. Suppose you have list of changesets you want to display. Then you may have use VersionControlServer method GetChangeset to retrieve Changeset object by id, and that object will have WorkItems collection with associated work items.

The issue here may be how to identify latest changesets. Here I would go for some simple (if not altogether elegant) solution - to get latest changeset ID created it is possible to use GetLatestChangesetId method of VersionControlServer, and then you may simply use all changesets IDs between latest id and (latest id - N).

Generally, about VSTS extensibility you might want to have a look at Buck Hodges blog (and more specifically at simple Version Control example).

Hope that helps.



 
 
BillWang





PostPosted: Team Foundation Server - General, How to get the work items by a ChangeSet ID from TfsWorkItemTracking database? Top

Got it and thanks a lot.
 
 
Naren Datha - MSFT





PostPosted: Team Foundation Server - General, How to get the work items by a ChangeSet ID from TfsWorkItemTracking database? Top

You can also check http://blogs.msdn.com/narend/archive/2006/08/08/691625.aspx to get workitems for given changesets