Creating Queries - Token for Current Iteration
When creating a work item query, you are given the option to select the iteration path for which the query is to return results for. It will be fantastic if a token was provided such as [Active Iteration] and you can specify the active iteration manually, or TFS calculating it via the Start/End dates
We have hundreds of queries that are of the form:
And WorkItemType In Task,Bug
And State in New,Active
And IterationPath Under @Project\Current
It would be really good to be able to write this basic query "All active bugs and tasks in current iteration" and then just "include" it in derived queries (e.g. base + "and AssignedTo=JoeBloggs")
Having just discovered a bug in one such query, and spent hours "copying and pasting" the core query into all the variations, this would have been a massive time-saver.
We often look at the backlog when doing quality checks and audits for work created or amended within an iteration.
When using the query editor, the only options on a date or datetime field when using the operator In is today -x days
Could we have for all date fields an option to select In then an iteration path and have the query return all matches where the date of the field being searched is within the start and end dates of the iteration
Why will you insert the possibility to Get the current Iteration Path in query filter: like TFS @CurrentIteration
When Sprint N finished and started Sprint N+1 we have to update all queries manually. It will be nice to have "Active Iteration Query" type or some kind of alternative.
Simplifying the user experience
Add @CurrentIteration variable to TFS so your team queries know which teh current sprint is like @Project or @Me
Since we can detect what the current iteration is for a team - it would be nice to be able to build work item queries that continually changed as the iteration changed - an @CurrentIteration filter would be fantastic!
TFS Current Sprint Macro for query builder:
If i have an Iteration tree like
ProjectName -> Sprint Number -> Sprint 80 -> Reports
I would a macro that allows all queries to change sprint automatically.
ProjectName -> Sprint Number -> "CurrentSprint" -> Reports
We are happy to let you know that we have addressed this suggestion. It will be enabled on Visual Studio Online this week, and if you have an on-prem installation, it will be included in TFS 2015 RTM.
For more details see the feature description at https://www.visualstudio.com/en-us/news/2015-mar-10-vso.
Would be great if you could use this and other VSTS variables/macros in PowerBI, particularly in the filters.
IF YOU WANT TO SEE @PREVIOUSITERATION AND @NEXTITERATION, please vote here:
Beth Whitezel commented
Go vote for this to be supported in Excel https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/13811595-support-currentiteration-in-excel
Beth Whitezel commented
:-( Only half completed... it needs to work in Excel.
My Name commented
You guys should update the feature description to remove TFS 2013 Update 5, it is wrong.
Phil Spokas commented
Hasan-uzzaman Sk: group the iterations as children you and then do an "under" query. The downside to this technique is you have to manually adjust your iterations. But, that's better than nothing.
Hasan-uzzaman Sk commented
We need a query to show work items from next two iteration. The CurrentIteration macro doesn't allow +1. How can I do this?
Ian Strathdee commented
Thanks IGD and Piotr - I thought I was losing it. The new query token is definitely listed as part of TFS 2013.5, yet on the actual details page for the new function it states "this is available through VSO and VS 2015." WTH happened to 2013.5???!?
Adam Beilchick commented
When will this token be supported in Excel?
Was it just me or were others expecting this to be included in TFS 2013 Update#5?
Per https://www.visualstudio.com/en-us/news/2015-mar-10-vso ....
'Support for the new token will exist in VS 2015 and VS 2013 Update 5.'
Too bad it's only for TFS 2015, how come it did not seem obvious to you guys that such token would be very usefull? Do you not use TFS yourself?
Vipul Patel commented
Have you tried @CurrentIteration
Daniel Steiner commented
have you set start and end dates on the iterations ?
Rachel Ambler commented
Still not working on my upgraded TFS 2015 RTM. Upgraded from 2013 successfully. However, although the drop down provides me macro in the query editor, TFS tells me "TF20037: No Iterations are selected for the team. The macro '@CurrentIteration' is undefined." when I try to save the query.
David Williss commented
Yay! The variable is recognized by VS2015. That is, as I type it, get the warning that it's not recognized until I complete the word. The warning still says it only recognizes @Me, @Project and @Today, but it goes away as soon as it says @CurrentIteration. Now I just gotta wait for approval to get somebody to upgrade our TFS servers because they're stuck at the previous version so I can't use it yet :(
Kevin MacDowell commented
It is not working for my online VS, I get
"TF20036: The macro '@CurrentIteration' is not recognized. Available macros include @Me, @Project, and @Today. The error is caused by @CurrentIteration."
When used, i see error: "TF20037: No Iterations are selected for the team. The macro '@CurrentIteration' is undefined."
Gaz Iqbal commented
Is this included in the "Update 5 - CTP 3" or will it only be available in the final version?
Christian Beermann commented
Thank you for listening to the community, Brain Harry! Now I don't have to edit all queries after the iterations for my 6 scrum teams. I love this little variable and it saves a lot of time each month! Big like for your dev-team. ;-)
Luc van Vugt commented