1
votes

Warning - newbie question....

I had a vision that I could select what workitem I was working on, and when I checked in the code, I could associate the changeset with the workitem automatically.

I'm assuming that:

  1. I would select a work item and state that I'm starting to work on it,
  2. make my changes to the code base as I see fit,
  3. each time a file is checked out, it is associated with the current work item, and
  4. when I check in I can state that I've stopped working on that work item.

Then if I review a work item, I can see what changeset is associated with that workitem, getting the full fidelity of what changes were made for that specific work item.

Is this possible? Is it automatic? All that I have found so far is a manual association of a changeset with a work item.

3
question is a little unclear...Mitch Wheat

3 Answers

7
votes

The order is: make changes, choose pending changes to check-in, select work item, do check-in. You can enable a check-in policy that forces the change to associate with a work item.

Update With TFS2012/TFS2013 Premium and Ultimate there is a much cooler way, using the "My Work" page. Before you start coding you select a work item from "Available Work Items" to "In Progress". From there you can directly jump to the "Pending Changes" page by clicking "Check In". It is also possible to suspend your work where the state of the IDE is saved.

Demo: http://go.microsoft.com/fwlink/?LinkID=251849

2
votes

What you're asking for is not a good idea. That pretty much only allows you to work on one work item per team project at a time. If you can do that, then you must be living a quiet life.

Instead, TFS allows you to associate a changeset with one or more work items - when you create the changeset. This makes it easy to see exactly which code changes were made in order to address a particular work item.

It also allows automated builds to be associated with work items, and enables Test Impact analysis. I don't think any of these things would make sense if you were simply associating a work item with the code you assumed you were going to have to change to address it.

0
votes

Actually at the project level you can enable "require work item" with checkin. This means that the work item be defined first so that you have somthing to associate with when a checkin takes place.