Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a TFS query macro for the current iteration?

Is there a way in TFS in VS2010 to specify that a particular iteration is the current one, and then return that for use in queries similar to the way @Project works? If not is there a way to do sub-queries in TFS work item queries?

like image 517
Glenn Slaven Avatar asked Jan 19 '10 00:01

Glenn Slaven


People also ask

What is @CurrentIteration?

The @CurrentIteration macro references the current team selected in the web portal.

What is WIQL query?

You can use the WIQL syntax to define a query as a hyperlink or when using the Work Item Query Language (REST API). The WIQL syntax supports all functions available through the web portal Query Editor plus a few more. You can specify the fields to return and specify logical grouping of query clauses.

What is @StartOfDay in Azure DevOps?

The @StartOfDay refers the time of “00:00:00” of the day that you want to manage rather than the whole day. So the query that you manage is empty. You can use @today to query. Thank you for helping us build a better Azure DevOps.


1 Answers

Looks like Microsoft listened. @CurrentIteration is being added as a token.

That’s great, of course. When looking to write a query against the current sprint, however, you are in danger of losing sight of unclosed work items in previous sprints. When you reach for @CurrentIteration, you probably just mean “all unfinished work that has been committed to a sprint.” If you filter to a single sprint, you’ll miss any stragglers you failed to close or move forward from previous sprints.

Consider using the following pattern, where “ScrumOfScrums\Release 1.0.0.0″ is your backlog path, and all of your sprint paths are children to that:

TFS query of work items Under the backlog iteration node, but not equal to the backlog iteration node. Also not Closed.

Filter for work items under your backlog iteration node, but not equal to the backlog iteration node. That will give you all items committed to a sprint.

This will also catch any items that weren’t closed in your previous sprints. Since the goal is to close every item in a sprint before moving to the next one, this query pattern will generally be better than using @CurrentIteration, unless you're looking to find the closed items in the current iteration.

P.S. While this is an old question, it was my top hit when I searched for info on querying the current iteration in TFS.

like image 183
Dane Avatar answered Sep 20 '22 03:09

Dane