Associate work item/changeset across team collection
-
Thursday, August 04, 2011 5:13 PM
Hi all,
Is it possible that we could associate work item/changeset across team collection? If not, is it possible that we could associate as uri from hyper link programatically? Please advise
Best Regards,
Best Regards, Andy Pham
All Replies
-
Thursday, August 04, 2011 10:20 PM
Hi Andy,Good question. However, it is not possible to link changeset or work items across collections. http://msdn.microsoft.com/en-us/library/dd236915.aspxIn addition, you should consider the following facts when you decide whether to create multiple collections:-
You cannot link work items across collections.
-
You cannot branch or merge code across collections.
-
You cannot create queries across collections.
It is however possible to associate the changeset to the work item by creating a hyperlink to refer to the artificat uri. You could use the TFS API to do this as well,This is the uRl i have been using to access work items,=> http://ServerName:PortNumber/tfs/web/wi.aspx?id=xxidxx.
The format i have specified does work with TFS 2010. It basically generates the path to the work item in Web view. Clicking on this opens the work item in the web view.As an alternate, you could get a navigatable URL programmatically as well.var tfs = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("TFSURL")); var versionControl = tfs.GetService<ICommonStructureService>(); var projects = versionControl.ListAllProjects(); var myService = tfs.GetService<TswaClientHyperlinkService>(); var myUrl = myService.GetChangesetDetailsUrl(21);
So, the service "TswaClientHyperlinkService" is microsofts TFS hyperlink service. This will generate the url formats for Absolute path, relative path, Path and Query, blah blah.
var testManagementService = tfs.GetService<ILinking>(); var testControllers = testManagementService.GetArtifactUrl(@"vstfs:///VersionControl/Changeset/205151");
This will generate, https://xxx/defaultcollection/VersionControl/Changeset.aspx?artifactMoniker=205151
HTH
Cheers, Tarun
Please remember to mark the replies as answers if they help.Blog: http://geekswithblogs.net/TarunArora
Subscribe in a reader- Marked As Answer by AndyPham Tuesday, August 09, 2011 4:04 PM
-
-
Thursday, April 26, 2012 7:35 AM
Hi Andy,
you could also use TEK workitem. It is a Visual Studio 2010 extension that allows open workitems and queries in Visual Studio from Hyperlinks.
It supports open items also across Project collections.
You find a couple of videos to see if it is what you need in Visual Studio Gallery:http://visualstudiogallery.msdn.microsoft.com/1397f185-7f49-49c8-ad80-e45fc9dbbfe9
I hope you find it heplfull
Regards


