Dennis
Dennis

Reputation: 1848

tfs 2010 create work item on partially succeeded build

We just updated our TFS2008 to TFS2010. On the daily builds on TFS2008 I had made an extra functionality in the TFSBUILD.proj so that on Partially Succeeded builds, a work item was created.

So if a build was going right, but one ore more unit tests did fail, a work item was created.

This was done by putting some extra xml in the TFSBUILD.proj. But after upgrading to TFS2010, this functionality was gone. And because the whole build architecture is changed in TFS2010, i cannot find out how to do this in... tfs2010.

So the question is: How to get a work item if a dialy build is partially succeeded.

Upvotes: 1

Views: 1128

Answers (2)

Dennis
Dennis

Reputation: 1848

After some extensive searching I found the solution.

I opened the UpgradeTemplate.xaml in BuildProcessTemplates, this is the one VS had created during the upgrade from TFS2008 to TFS2010.

Almost at the end of the workflow there is an if-statement called: If TestStatus = Unknown

The Else is empty, I put there an OpenWorkItem activity. So now on an unit test failure, a work item is created.

See also: http://blogs.msdn.com/b/lab_management/archive/2010/02/25/creating-a-bug-on-test-failure.aspx

Upvotes: 1

Daniel Morritt
Daniel Morritt

Reputation: 1817

I've had a look through the defaulttemplate.xaml, and it looks like you're going to have to play around with that to replicate what you have currently, on the plus side it doesnt look too hard. It's just a xaml file so opens in a VS designer, should be ok for what you need.

Might want to make a copy and set the template in your build definition > process > build process template while you play :)

Upvotes: 0

Related Questions