How do I get work items associated with a changeset id using the tfs api?

Hey. I need to get a programmatic list of work items associated with selected changesets. So far I have been able to get a set of changes associated with a work item id using the concept of artifacts and also get changes and / or work items associated with a specific assembly using:

InformationNodeConverters.GetAssociatedChangesets () and InformationNodeConverters.GetAssociatedWorkItems () respectively.

I am using VSTS 2010 beta 1. Does anyone know a solution?

+2


source to share


1 answer


Try the following:



Changeset cs = versionControlServer.GetChangeset(changesetId);

foreach (WorkItem wi in cs.WorkItems)
{
    Console.WriteLine(wi.ID);
}

      

+5


source







All Articles