TFS query mixing Tasks and Bugs, sorted by Priority

Posted by Val on Stack Overflow See other posts from Stack Overflow or by Val
Published on 2010-04-20T19:38:42Z Indexed on 2010/04/20 19:43 UTC
Read the original article Hit count: 265

Filed under:
|
|
|

We're using TFS with MSF for Agile 4.2 on a project, and I have a bunch of work to do, both Tasks and Bugs. Both are prioritized by our managers, and assigned due dates and target releases.

I use a Work Item query as my main TODO list, and I want to list all the Work Items assigned to me, in order by due date and priority.

Problem: I can't seem to find a way to write a unified query that will list both Tasks and Bugs sorted by date and then priority. The problem is that Tasks and Bugs use different fields for Priority. So, my query currently lists the tasks by Due Date, then by Task Priority, then it lists Bugs by Due Date, then by Priority. So, I see tasks that are due later than bugs:

Title    Due Date    Priority   Task Priority
task1    4/23/2010              Medium
task2    4/23/2010              High
task3    4/30/2010              Low
task4    4/30/2010              Medium
bug1     4/23/2010   1
bug2     4/23/2010   2

What I want:

Title    Due Date    Priority   Task Priority
task1    4/23/2010              Medium
task2    4/23/2010              High
bug1     4/23/2010   1
bug2     4/23/2010   2
task3    4/30/2010              Low
task4    4/30/2010              Medium

I don't care if the bugs come before or after the tasks on the same due date; I just want all the work items grouped together by due date, so I never see Tasks for a later due date before Bugs for an earlier one.

Another problem is the sorting on Task Priority -- alpha sort means I can't get them to sort by the meaning of the priority. But that's a minor problem I can live with if I can get the Tasks and Bugs intermingled. Any way to do this in a single query?

© Stack Overflow or respective owner

Related posts about tfs

Related posts about query