Mylyn: Creating new Issues from TODO comments

Wednesday, March 3, 2010

On Twitter, the Eclipse PDE lead commented on a neat feature of Mylyn that I hadn’t seen before: the ability to add issues/bugs into your issue tracker directly from the “Problems” view. I wanted to see if you could do this from the “Tasks” view if you entered “TODO” comments into your CFML, and sure enough, it works. As of this writing, CFEclipse supports TODO tasks but ColdFusion Builder does not. Please consider voting for this feature request.

What I love about this feature is that you can fairly seamlessly create tasks and attach your context for that new task in less than a minute. When executives yammer on about “Work Smarter, Not Harder”, Mylyn features such as this exemplify the “work smarter” mentality. The point here is that you reduce friction in two areas: 1) creating the task with relevant information, 2) sharing your context with the developer to whom you’re assigning the task.

Reduced friction == Increased Productivity.

Here’s how:

In Words:

  1. In CFEclipse, enter a TODO comment in your source code, Something like <!--- TODO: make this thing actually work --->
  2. Open the “Tasks” view – notice your TODO is now in the that view as a new task
  3. Right click on that table row, and select “New Task from Marker”
  4. This will bring up the screens necessary to add the issue to your issue tracker (or enter as a “Local task” if not using an issue tracker)

To then attach that file as the “context” for the issue:

  1. Activate the new task
  2. Navigate back to your file that contains the “TODO”. This file will now be part of the context for the issue
  3. In the Issue editor, go to the “context” tab and click the “Attach Context…” link. Follow the steps to completion
  4. Note that this is the same thing I wrote about previously

Now, when the developer to whom the issue is assigned (even if it’s you) opens this issue, they’ll be able to retrieve the context and get working on the file you want them to work on without having to navigate a single tree.

If this ain’t Jedi effect smoothness, I don’t know what is.

Happy Coding.


Jim said...

That is the shiznit! I've always loved the TODO comment trick and this makes it that much more useful.

Sammy Larbi said...

"Reduced friction == Increased Productivity"

Not only that, but reduced friction also means there's a higher probability things get done!

Nice work.

Marc Esher said...

Darn good point Sammy. Thanks for dropping in!

suspiria said...
This comment has been removed by the author.
suspiria said...

Anyone heard of a way to get TODOs working on ColdFusion Builder? Can't believe they left this out of 1.0!!!

I can't imagine it being too hard to integrate, given that it works in CFEclipse...

Marc Esher said...

suspiria, there's nothing you/we/anyone can do except the cfbuilder team. If you really want this feature, please vote for the bug in the original post.

Mike said...

Personally, I'm not a big fan of the TODO construct. I seem to find them littering old code where the design of the app has changed so much that they ate no longer appropriate.

Have you considered using the native bookmarks that exist in eclipse? They work pretty much the same and don't litter your code with things that can be forgotten.

Jim said...

in cfbuilder add the TODO comment and then right click in the left gutter and select "Add Task..."

Jim said...
This comment has been removed by the author.