title: TFS: How can I automatically close matching work items on successful build?
body: <p>We are using continuous integration as part of our build automation.  For every check in, the tfs build server builds the project and deploys to our web servers on success.</p>
  
  <p>When the build fails, it automatically creates a new Bug with the details of the build failure.</p>
  
  <p>Due to CI and the activity on the server, this might result in 10 or 20 failure work items before the build starts succeeding again.</p>
  
  <p>So, I have two options.  I'd like to either have the build process see if an open work item already exists for a build failure and just add details to that; OR, I'd like the build server to close all of the build failure items automatically when it starts working again.</p>
  
  <p>Any ideas?</p>