views:

518

answers:

5

When I right-click a solution in VS2008 and select Check In... I am presented with a list of changed files with check boxes and a comment area. (This is done against TFS.)

Our check-in process requires that we enter this list of changed files into the bug tracking ticket. This requires typing in the name of each each file: time-consuming and error prone.

Ideally I'd like to be able to select that list and copy it to the clipboard so that I can paste it into the bug tracking system.

Does anybody have a way that I can easily get that list into the clipboard?

+1  A: 

Why dont you take a screenshot (alt+Prnt Scrn) of the checkin dialog and upload the image to the bug tracking system?

Fred
I had thought of that and was tempted to but that's been ruled out - thanks for the idea though.
Guy
+2  A: 

I use SnagIt for such things, it is really an amazing application. They have non-free versions and a free version (instructions here). I don't know how I lived without it, honestly.

Among its features is the ability to scrape text from a window (like Windows Explorer folder view) which will probably meet your needs.

discgolfer
+2  A: 

I don't know no standard way, how to do it. But you can create a tool to do this.

      string strServer = startInfo.Server;
      string strWorkspace = startInfo.Workspace;

      Microsoft.TeamFoundation.Client.TeamFoundationServer tfsServer = null;
      if ( false == string.IsNullOrEmpty( strServer ) ) {
       tfsServer = new Microsoft.TeamFoundation.Client.TeamFoundationServer( startInfo.Server );
       tfsServer.Authenticate();
      }

      Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer vcServer = null;
      if ( tfsServer != null ) {
       object obj = tfsServer.GetService( typeof( Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer ) );
       vcServer = obj as Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer;
      }

      Microsoft.TeamFoundation.VersionControl.Client.Workspace workspace = null;
      if ( tfsServer != null && vcServer != null && false == string.IsNullOrEmpty( strWorkspace ) ) {
       workspace = vcServer.GetWorkspace( strWorkspace, tfsServer.AuthenticatedUserName );
      }

      List<string> pendingItems = new List<string>();
      foreach ( Microsoft.TeamFoundation.VersionControl.Client.WorkingFolder folder in workspace.Folders ) {
       pendingItems.Add( folder.ServerItem );
      }

      List<string> localFilePaths = new List<string>();
      string userName = tfsServer.AuthenticatedUserIdentity.AccountName;
      Microsoft.TeamFoundation.VersionControl.Client.PendingSet[] pendingSets = workspace.QueryPendingSets( pendingItems.ToArray(), Microsoft.TeamFoundation.VersionControl.Client.RecursionType.Full, null, userName, false );
      foreach ( Microsoft.TeamFoundation.VersionControl.Client.PendingSet ps in pendingSets ) {
       foreach ( Microsoft.TeamFoundation.VersionControl.Client.PendingChange change in ps.PendingChanges ) {
        localFilePaths.Add( change.LocalItem );
       }
      }
TcKs
+2  A: 

Obviously, a big advantage your organization would have is if they also moved the bug tracking system over to TFS then when you check in the files you could associate that check-in with the work item (bug, task etc) and the association would be taken care of for you. It would also allow lots of reporting etc etc - all good stuff.

Martin Woodward
I think that the reason that we haven't done that is because there are a number of projects based on other technologies (PHP etc.) that aren't using TFS but need to use the bug tracking system.
Guy
BTW, you can have all your technologies (including PHP) using TFS if they want to. You'd certainly be getting a lot more value out of your investment in TFS.
Martin Woodward
+2  A: 

Hi Guy,

If your company has installed the Web Access Power Tool for TFS, then you could just paste a url into your bug tracking system that links back to the check in.

It would look like this...

http://mytfs:8090/cs.aspx?cs=1234

Saves time and has very little chance for error.

Ta.

Steve Porter