Modify Build Failure Work Item in TFS 2010 Build
Posted
by Jakob Ehn
on Geeks with Blogs
See other posts from Geeks with Blogs
or by Jakob Ehn
Published on Wed, 28 Apr 2010 19:15:25 GMT
Indexed on
2010/04/28
20:17 UTC
Read the original article
Hit count: 692
The default behaviour in TFS Team Build (all versions) is to create a bug work item when a build fails. This main benefit of this is that you get a work item for something that needs to be done, namely to fix the build!. When the developer responsible for the build failure has fixed the problem, he/she can associated that check-in with the work item that was created from the previous build failure.
In TFS 2005/2008 you could modify the information in the created work item by changing some predefined properties in the TFSBuild.proj file:
In TFS 2010, with Windows Workflow, you change this by modifying the properties on the OpenWorkItem activity. The hardest part of this is to actually find where this activity is located in the build process workflow. If you open the build definition in XAML you can just search for OpenWorkItem. If you use the designer you need to click your way down to the Catch section of the Try to Compile the Project sequence:
To change the default values of the created work item, select the Created Work Item activity and look at the Properties window:
Note the CustomFields property which is a dictionary with key (work item field name) and value. If you add custom fields to your work item you can add a value for it here by adding a new entry in the dictionary.
© Geeks with Blogs or respective owner