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

In the visual studio, you can create "tasks" by inserting the following comments:

//TODO: Make me a sandwich before looping. 

Then these tasks can be viewed in the menu View > Task List . But these tasks are completely independent of Team Foundation Server.

It would be extremely useful to automatically create a new Team Foundation work item when adding a TODO task so that the work item can be assigned, commented on, attached, linked and linked to checks, etc.

Does anyone know if this is possible?

+4
source share
3 answers

My suggestion - even if it was possible:

Do not do that:)

//TODO: very light, you can add / delete / change these lines as you like, without affecting, except that you control the source.

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

Syncing and tracking will be a nightmare. Therefore, I think no one knows about this.

+4
source

We use:

// TODO: for comments / reminders from developers. - Only internal / developer

WorkItems for tracking errors / functions / tasks (Inprogress / Complete / etc.) - Only a team / developer / tester.

Support request for end-user visibility. - All / End Users

I do not think that they should be mixed, because they use different goals.

+3
source

I totally agree that turning TODO elements into work elements is the wrong way.

But, considering this as an exercise with the capabilities of the instrument, I think this can be achieved. You can define a dummy assembly with custom activity in it.

Here's a series of Ewald Hoffman's blog posts explaining how to set up 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 the assembly version with each assembly. He does this by including a custom action in an assembly that scans code files to catch a text template (in this case, the assembly's xml tag) and update it.

The same approach can be used to capture TODO elements (for the sake of exercise), and work elements can be created using the TFS API.

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

+3
source

All Articles