In my Company we are using Team Foundation Server 2012 and Agile as Project Template. We are still learning how the Board and the Backlog show Tasks within User Stories and I realized that "Orphan" Tasks are not shown in these cases...
I made an query to solve the problem about the "Orphan" tasks but I realized that the same issue is happening when a User Story and a Task have, for some reason (maybe someone assign it to a User Story after creating it), a different iteration path... the tasks are not shown in the Backlog or Board.
Is there an automatic way to make tasks having the same iteration path as their parents? How can I make a query to show tasks whose User Stories have a different iteration path as them?
Thanks a lot in advance!
Well. After more researching I have realized about two thing:
- It is not needed to do this in order to show the Tasks in the Board/Backlog because, if the User Story contains tasks that are defined in different iterations, the User Story will be shown in the different iterations, repeated, but only with the tasks belonging to the iteration.
- If someone still wants to create the query, maybe to reunite User Stories, the solution is creating a new Query of the type Work Items and Direct Links and change the following parameters:
* In Filters for top level work item Add a new clause And Iteration Path = IterationA
* In Filters for linked work items Add a new clause And Iteration Path <> IterationA
* In Filter options Types of links select Return selected link types and check Child and Parent.
Unfortunately there is no way, so far I know, to do it automatically for all iterations so you have to do a Query of this type for all iterations.
Related
I am getting started with TFS 2015 and I need to know how to make a query that returns all of the work items for the current iteration for the current team. I have Iteration Path Under #CurrentIteration and Work Item Type = User Story, but I can find a macro similar to #CurrentIteration that would get the current team or team area. How do I filter out the stories for all other teams?
It's not able to do this through a query. You could check the Query macros or variables, use the macros described in the following table to filter your queries based on specific fields. There is not any team area related macro.
Besides, actually as far as I know work items can only be assigned to specific people not groups. However, for a workaround. By assigning a work item to a specific area path you basically assign it to a team. If you use the area path for something else today, you can also use another string field in the work item that specifies the team.
(https://www.visualstudio.com/docs/work/scale/portfolio-management)
So you could use Area Path to do the filter.
This won't directly solve your problem but you can use 'Assigned to' 'In Group' and then use a user group e.g. '[Home]\Team NI'. This will return tickets assigned to the group or group members but assumes the tickets are assigned appropriately (rather than being unassigned). YMMV but I've found it useful at times to get around this limitation. TFS Azure 2019 now also includes #TeamAreas - which is helpful unless you have multiple teams using the same areas.
I would like create a Flat list of work items query in TFS in which the results contain all of the specified PBI and Bug cases and any Task cases that have no parent.
It's that Task with no parent part that has me perplexed. I cannot see a way that I can do what seems so obvious such as (Parent Link Count = 0) because that attribute is not exposed to me though, strangely, some other link type counts are.
Any ideas?
You need to change the type of your query to the Direct Links query, then choose the option to pull back all work items without any matching links. The results will still be a flat list.
When I move a user story from one iteration to another in TFS 2010, I then have to update the iteration in each child task manually. Otherwise it retains the previous iteration value and the various reports and filters don't produce the intended result.
Can anyone recommend a method, or extension, that will either keep the task iterations synchronised to their user story iterations automatically, or failing that, do it for all user stories/tasks in a product on demand?
Try TFS Aggregator
Example Uses
Update the state of a Bug, PBI (or any parent) to "In Progress" when a child gets moved to "In Progress"
Update the state of a Bug, PBI (or any parent) to "Done" when all children get moved to "Done" or "Removed"
Update the "Work Remaining" on a Bug, PBI, etc with the sum of all the Task's "Work Remaining".
Update the "Work Remaining" on a Sprint with the sum of all the "Work Remaining" of its grandchildren (i.e. tasks of the PBIs and Bugs in the Sprint).
Sum up totals on a single work item (ie Dev Estimate + Test Estimate = Total Estimate)
You can export all the work items in Excel and mass edit them into the new value.In order to do so, you need to maintain a work item query and have all WIs within one Team Project. Typically this is an activity that goes down during planning poker when a new iteration is about to start.I found this presentation by A.Bjork very useful on how to do (among other things) tasks like that.
We are using the agile template, and have user story's with linked tasks.
Some user stories assigned to me and some tasks, for users stories, are assigned to me.
What I'm trying to get is all work items that are assigned to me, or work items where a linked work item is assigned to me in a tree of work items view (not flat list)
So right now I have:
any work item in this project and iteration (not closed\resolved, and not a bug)
AND
any linked work items assigned to me (not closed\resolved)
But this returns user stories, where I don't have tasks assigned to me. But if I change the first part of the query to be filter out items not assigned to me the 'Tree of Work Items' is not show for where I only have tasks.
The output I would like would exclude user stories where I don't have tasks, and include users stories where I do... something like this:
User Story 1 --> team member A
---->Task 1a --> me
User Story 2 --> me
---> Task 2a --> team member B
Any ideas what the query would be?
Thanks
What you want is not possible in one single query. The filter you do on the parent and on the child will be combined to an "AND" filter operation.
To get only the parents for which you have tasks, choose the query type "Work Items and Direct Links" and in the child section add a filter on "assigned to = #me" and select the option "Only return items that have specified links".
Seems like that has been improved as of TFS 2012.
You can have a Tree of Work Items, where your linked work items are filtered according to your preferences (assigned to me, not closed, iteration etc.)
Then make sure to add "Filter options" -> Match lined work items first -> Parent/Child
That should filter any parents, not having sub tasks assigned to you and other filters you applied.
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?
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:
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.
I'm afraid that there is not such a macro. I personally just have a few "X in current iteration" team queries and then edit those queries to point to the new iteration path at the start of each iteration.
I am going to try using a standard name for the current iteration such as 'Current'. The queries for this iteration would all reference this name. Once the iteration is completed, I will rename it using a naming convention that includes the date for example and the next iteration would then be created with the name 'Current' (or renamed to this if it already exists). The queries would then return results from the new iteration.
- 2010-49
- Current
- 2010-51
I am not sure whether renaming iterations this way will cause any conflicts or confuse the data warehouse for example but this would save on having to create or modify a heap of queries at the start of each iteration.
I would be very interested to hear feedback on this approach!
Query for Sprint in a date interval as shown here:
Team Project = #Project
And Work Item Type = Sprint
And Start Date <= #Today
And Finish Date >= #Today
I have found that Telerik's free Work Item Manager provides an elegant solution to this problem.
Just define your queries as you usually would but leave out any filters relating to iterations (note that this also applies to areas). There is a treeview pane named 'Area/Iteration Filters' that will add extra, recursive filtering based on the iteration (or area) that you select there.
Note that if the pane is not visible then you can enable it via the View menu.