Mike Cheel
Mike Cheel

Reputation: 13106

TFS 2010 Upgrade template - How to turn off automatic work item creation when the build fails?

We are using the upgrade template for one of our builds and when it fails it creates a work item. Keeping in mind this is the upgrade template, is there anyway to turn this functionality off? I don't see the option like I do in the default template.

Upvotes: 4

Views: 2239

Answers (2)

James Reed
James Reed

Reputation: 14052

This is set in the TFSbuild.proj if youre using the upgrade template (essentially the upgrade template just runs this file, so Team Build behaves just like TFS 2008). In the proj file you will see a section

<!-- Additional Properties -->

<!--  WorkItemType
 The type of the work item created on a build failure. 
 -->
<WorkItemType>Bug</WorkItemType>

<!--  WorkItemFieldValues
 Fields and values of the work item created on a build failure.

 Note: Use reference names for fields if you want the build to be resistant to field name 
 changes. Reference names are language independent while friendly names are changed depending 
 on the installed language. For example, "System.Reason" is the reference name for the "Reason" 
 field.
 -->
<WorkItemFieldValues>System.Reason=Build Failure;System.Description=Start the build using Team Build</WorkItemFieldValues>

<!--  WorkItemTitle
 Title of the work item created on build failure.
 -->
<WorkItemTitle>Build failure in build:</WorkItemTitle>

<!--  DescriptionText
 History comment of the work item created on a build failure. 
 -->
<DescriptionText>This work item was created by Team Build on a build failure.</DescriptionText>

<!--  BuildLogText
 Additional comment text for the work item created on a build failure.
 -->
<BuildlogText>The build log file is at:</BuildlogText>

<!--  ErrorWarningLogText
 Additional comment text for the work item created on a build failure. 
 This text will only be added if there were errors or warnings.
 -->
<ErrorWarningLogText>The errors/warnings log file is at:</ErrorWarningLogText>

<!--  UpdateAssociatedWorkItems
 Set this flag to enable/disable updating associated workitems on a successful build.
 -->
<UpdateAssociatedWorkItems>true</UpdateAssociatedWorkItems>

You can either comment out or delete everything below <!-- WorkItemType..... and add the following

<!-- Additional Properties -->
<SkipWorkItemCreation>true</SkipWorkItemCreation>

Upvotes: 3

Reza
Reza

Reputation: 834

Does this work?

1- Right click on build definition

2- Edit Build definition

3- Process

4- Expand advanced

5- Create work item on failure. Set it to false

Upvotes: 9

Related Questions