Skip to content

How to Get Your Entire Work Item History in TFS

Robert Greiner
Robert Greiner
2 min read

The more I use TFS at work the more I like it. However, with large development teams the sheer number of work items that are created over time can be staggering and searching through them to find a particular work item you are interested in can be extremely tedious.

Today I ran into an issue where I needed to track down some information on a work item I completed several months ago and had since been assigned to someone in our test group. Tracking down this particular work item outside of TFS would have been a small nightmare so I decided to try and come up with a query that would pull back every single work item I have ever been associated with.

The query to do this is actually pretty simple and requires two conditions:

  1. History Contains @Me
  2. Or Assigned To = @Me

History Contains @Me will pull back every work item that you have ever interacted with whether you associated a changeset with it, assigned it to someone else, or simply closed the work item because it was a duplicate. This condition alone is very powerful and will give you a complete history of every work item you have ever worked on.

The Assigned To = @Me condition is gravy at this point. This will allow you to catch all of the work items that are assigned to you that you haven't worked on yet (and thus, built no history in).

You can add some additional coolness to your query by sorting by specific column types. This will allow you to scan through your work items more efficiently.

I prefer the following columns to be sorted (in this order)

  1. State - Ordering by State first will keep all of your Active work items at the top of the list.
  2. Next Action - This will keep all of your Queued and Coding work items together.
  3. ID - This will keep the newer work items above the older ones.

Finally, adding a few extra columns to your query will help give you the bigger-picture context for each work item without forcing you to open it.

Here is what I use, your mileage may vary depending on your development workflow.

By adding this superset query in TFS you will be able to obtain a more complete picture of all of your past work items whether or not they are still assigned to you. This makes things especially handy for when you are trying to hunt down details for work you completed months or years in the past.

Please consider subscribing, it's free.
Technology

Robert Greiner Twitter

Professional optimist. I write a weekly newsletter for humans at the intersection of business, technology, leadership, and career growth.


Related Posts

Members Public

AI Rule #1 - Customer First

In 1985, Warren Buffett wisely said, "The first rule of investment is don't lose. And the second rule of investment is don't forget the first rule, and that's all the rules there are." Similarly, the first rule of AI investment is to

AI Rule #1 - Customer First
Members Public

Navigating the Upside Down as a Technology Leader

Ideas for leading technology organizations with confidence and creativity.

Navigating the Upside Down as a Technology Leader
Members Public

Artist for a Day

The future of creative output is multiplied by AI.

Artist for a Day