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)

team-foundation-server-query-iteration-cameron-dwyer

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.

team-foundation-server-query-current-iteration-cameron-dwyer

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.”

 

team-foundation-server-excel-query-error-current-iteration-token

One thought on “TFS Queries and the @CurrentIteration Token

Add yours

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: