work items not associated with build

How should work items get associated with builds, because it is not working for me.

When I check in a changeset, I click the Work Items button and select my work item and the drop down box says associate. After the build completes, my changeset appears in the Associated Changesets portion of the build report butI have 0 associated work items.

If I open the changeset I can see that the work item is associated with changeset, but the build didnt pick it up.

Any thoughts or suggestions would be appreciated.
MikeH

[545 byte] By [MikeHenrickson] at [2007-12-21]
# 1
I believe that the workitem has to be 'resolved' in order to show up in the build. Until its been 'resolved' its not considered to be in the build.
kayers at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 2
So if I customize a work item to have specific states, and 'Resolved' isnt one of them it will never get associated?
MikeHenrickson at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 3

I believe the reasoning is that a build should only have those items which need to be tested.

As alternatives:

you should be able to customize the build to associate other workitems, but I don't think its out of the box.

Or, you should be able to write a report that shows associated workitems fairly easily.

kayers at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 4

Thanks for your responses, Kayers.

Any idea on how to customize the build the gather work items with states other than Resolved?

Thanks
MikeH

MikeHenrickson at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 5

I think there is some confusion here about changeset / work item association, changeset / build association, and the updating of work items by builds. I will do my best to clear it up:

* When you check in a changeset and associate work items with it, you are creating an association between the changeset and the work item(s). This process does not directly link either the changeset or the work item to a build.

* Each build is associated, by the GenCheckinNotesUpdateWorkItems task and the team build logger, with all of the changesets that were checked in for its files since the last "good" build (where "good" means that compilation and tests both succeeded).

* Each build also updates the "Integration Build" field (the "Microsoft.VSTS.Build.IntegrationBuild" field, actually) of each of the work items associated with each of the changesets associated with the build (see above). That is, for each of the changesets associated with the build in the previous step, each of the associated work items has its "Integration Build" field set to the current build number.

This behavior can be turned on or off using the $(UpdateAssociatedWorkItems) property in the TfsBuild.proj build script. Work items can be updated even on broken builds by using the $(UpdateAssociatedWorkItemsOnBuildBreak).

* Finally, builds can actually create new work items on build breaks. This behavior can be turned on or off using the $(SkipWorkItemCreation) property, and the specifics of the work item created can be controlled using various properties in the TfsBuild.proj build script associated with the build type.

In general, work items should not need to be "resolved" in order to be associated with a build. All of the work items associated with all of the changesets associated with a build should themselves be associated with the build. The only caveat here is that work items which do not have a "Microsoft.VSTS.Build.IntegrationBuild" defined will not be associated with the build (in addition to not having that field updated). If this is what is going on for you, you should see explanatory error messages in your build log.

Hope this helps - if you have a "Microsoft.VSTS.Build.IntegrationBuild" field in your work items and still are not seeing them in the Associated Work Items section of your build reports, this sounds like a bug.

-Aaron

AaronHallberg at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 6

Thanks for clearing it up, Aaron.

I do not have the IntgrationBuild field anymore, I will add it back in and test it out.

--MikeH

MikeHenrickson at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...

Visual Studio Team System

Site Classified