1
votes

We are using the Agile process template in Visual Studio Team Services and prioritize User Stories on the Backlog. We are not explicitly prioritizing Tasks but rather, work on them based on the order of the User Story that is their Parent in the Backlog (drill down to the Task through the User Story on the Backlog).

I would like to make a query available to developers which is focused on Tasks that are assigned to them but ordered by the User Story on the Backlog with which they are associated. It is intended for use in the My Work pane of the Team Explorer in Visual Studio where I found that only the top level of direct link and tree queries are returned - not the child items.

enter image description here

Filtering based on linked Work Items is well supported but I have not so far found any means of sorting by linked Work Items. Note the Stack Rank field in the 'Filters for linked work items' region in the screenshot below this filters and does not sort which is what I am after.

Screenshot of work item query definition.

2

2 Answers

5
votes

Create a Direct Links Query as before but start with matching the User Story (you can scope this to an iteration, check states etc.)

Then have a linked criteria for Task assigned to @Me in certain states. The key is to set the sort column to Stack Rank [Asc] so that you get the right order.

It's important to note that this won't show any orphaned tasks (ones with no parent User Story) assigned to the user and if you restrict the Story state then it wouldn't show any Tasks that were Active after the parent was completed (it shouldn't be anyway)

Query

Sort order

1
votes

"Available Work Items" in "My Work" panel only show the top level items of the query by default. There isn't any way to change this for now. And ordering by the linked work items isn't supported for now either. You can submit a feature request on VSTS User Voice.

The alternative way for now is just like what you said: Clicking "Open Query" to check the detailed result of the query.