— New online course!  Getting Started with Azure DevOps — Special launch price 50% off —

Managing TFS Team Build History: Delete Completed Builds From "All Build Types" & Bug Work Item Drop-downs

by

Here’s another blog post that came from an attendee question at VSLive Vegas

In Team Foundation Server (TFS) there are at least two places where you can see completed Team Builds: the “Team Builds – All Build Types” screen and the Bug work item’s “Found in build” and “Resolved in build” drop-down lists.  

Here’s what it looks like on the All Build Types screen: 

Here’s what it looks like on the Bug work item.

These lists can get very, VERY long.  On the All Build Types screen, it is not much more than an annoyance.  When you have to look at the list in a drop-down list on a work item, it’s a huge pain. 

The question that I got at VSLive is “how do you delete builds from these lists?”  (Hmmm.  Good question.  It certainly isn’t obvious, is it?)

These values come from two different places.  The All Build Types comes from the build system and the Bug drop-down lists come from a TFS Global List. 

You can see where those values for the drop-down come from by opening up the Bug work item template and searching for “FoundIn”.

Notice that the <SUGGESTEDVALUES> contains the <GLOBALLIST NAME=”Builds – BDC” />.  That tells the work item editor to read the global list named “Builds – BDC” and put all the values into that drop down list.  (Pretty slick, huh?)

Let’s tackle the All Build Types first because it’s easier.

To delete from the “All Build Types”:

  1. Figure out which build number you want to remove
  2. Go to the VS2005 command prompt
  3. Type in:
    tfsbuild.exe delete name_of_tfs_server name_of_projectname of the build”
  4. Hit enter
  5. Close the All Build Types window
  6. Re-open the window.  The build should be gone.

Delete a build by editing a global list

Deleting from a global list is more involved.  (Disclaimer: One way is to use the Process Template Editor but I find that it’s generally a little buggy and I therefore don’t trust it…but I’m also kind of a command-line guy and like to know the “Real” way to do stuff.) 

  1. Figure out which build number you want to remove
  2. Go to the VS2005 command prompt
  3. Type in:
    glexport /f globallists.xml /t http://tfs_server_name:8080
  4. You’ll now have a file named globallists.xml.  Make a backup copy of the file just in case you make a mistake.
  5. Open globallists.xml in Notepad.  
  6. You should see about a zillion <LISTITEM>’s.  Find the <GLOBALLIST> that corresponds to your Team Project
    (name=”Builds – TeamProjectName“) and delete the <LISTITEM>’s that you don’t want. 

  7. Save globalists.xml.
  8. On the command line, type in:
    glimport /f globallist.xml /t http://tfs_server_name:8080
  9. Go to Team Explorer.  Right-click the team project you just made the adjustment for and choose Refresh.
  10. The build should now be gone from the drop down lists.

 

-Ben

 

— Looking for Team Foundation Server (TFS) or Visual Studio Team System (VSTS) consulting, mentoring, installation, configuration, customization, or training?  Contact me via http://www.benday.com.


2 Responses to "Managing TFS Team Build History: Delete Completed Builds From "All Build Types" & Bug Work Item Drop-downs"
  1. Can I load data from a specific field in dropdown for selection. for example I have a field "TrackingNumber" in Task workitem. I want all "TrackingNumber" loaded in other bug/task workitem for selection.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: