TFS Queries and the @CurrentIteration Token

I was pleasantly surprised this week when I dived into TFS Online to tweak some queries and stumbled upon the new @CurrentIteration token that can be used.

This token can potentially solve the administration overhead associated with getting consistent reports out of TFS from sprint to sprint.

In the past I have had a series of TFS Queries to track the progress of things happening within the sprint such as:

  • Outstanding Product Backlog Items (with associated outstanding child work items shown in tree view)
  • Outstanding Product Backlog Items (flat list)
  • Done Product Backlog Items

The problem with these queries was that each of the queries has to conditional match a specific sprint (iteration)


The new @CurrentIteration token can be used to dynamically work out what the current iteration (sprint) is so that you don’t have to manually update all the queries when the sprint changes.


Here’s a post from Microsoft regarding the new @CurrentIteration token when it shipped.

This is a great step forward and probably should have been there a long time ago.

One not so nice thing I’ve discovered with using the @CurrentIteration token in queries is that Excel 2013 fails to open any query that uses the @CurrentIteration token and gives the error message:

“TF80076: The data in the work item is not valid or you do not have permissions to modify the data. Correct the problem and retry.”



About Cameron Dwyer

Architect and developer at OnePlace Solutions. Passionate about delivering compelling solutions on the Office 365/SharePoint platform. Addicted to coffee.

Posted on June 24, 2015, in TFS and tagged , , , , , , , . Bookmark the permalink. 1 Comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: