开发者

Is it possible to automatically convert Visual Studio TODO comment tasks into Team Foundation work items?

In visual studio, one can create "tasks" by inserting comments like this:

//TODO: Make me a sandwich before looping.

These tasks can then be viewed under the View > Task List menu. But these tasks are entirely independent from Team Foundation Server.

It would be extremely useful to be able to automat开发者_高级运维ically create a new Team Foundation work item when a TODO task is added, so that the work item can be assigned, commented, attached to, linked, and associated with check-ins, etc.

Anyone know if this is possible?


My suggestion - even if it was somehow possible:

Don't do that :)

//TODO: is very lightweight, you can add/remove/modify those lines as you like with no impact besides being source controlled.

TFS work items are much more heavyweight and process oriented (only so-and-so many state changes are allowed according to a process template).

Synchronization and keeping track would be a nightmare. Therefore I think nobody I know of does it.


We use:

//TODO: for developer comments/reminders. - Internal/developer only

WorkItems for Bug/Feature/Task tracking (Inprogress/Complete/etc.) - Team/developer/tester only.

Help Desk Request for End User visibality. - All/End Users

I don't think they should be mixed as they server different purposes.


I completely agree that turning TODO items into work items is the wrong way to go.

But considering this as a tool capability exercise I think it can be achieved. You can define a dummy build with a custom build activity in it.

Here is a series of blog posts by Ewald Hoffman teaching how to customize Team Build.
http://www.ewaldhofman.nl/post/2010/05/13/Customize-Team-Build-2010-e28093-Part-5-Increase-AssemblyVersion.aspx

Part 5 discusses how to automatically increase assembly version with each build. He does this by including a custom activity in the build which scans through code files to catch a text pattern (in this case the assembly version xml tag) and update it.

The same approach could be used to catch TODO items (for the sake of the exercise) and work items could be created through TFS API.

Again, I do not recommend doing this but this technique could be used to solve other similar problems.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜