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.

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

Artist for a Day

The future of creative output is multiplied by AI.

Artist for a Day
Members Public

The Auto Industry's Cloud Awakening

Auto manufacturers are behind the cloud adoption curve but are well-positioned to unlock the future of mobility by building foundational capabilities across six key areas.

The Auto Industry's Cloud Awakening
Members Public

Off Topic Thursday: Apple Keynote Event Reflections

Igor and Robert nerd out on the recent Apple Keynote Event from October 13th 2020 and share their reflections about exceptional production value, new products, and Apple’s evolution as an organization.