It's all about the answers!

Ask a question

Query Sort by Hierarchy


Jamie Pompu (211) | asked Apr 17 '19, 10:55 a.m.

 Hello, 


I have a question around queries and sorting based on hierarchy. I'm looking to create a query that's main purpose is to be used for Sprint planning. It will have a list of all work planned for that sprint. That list can be exported (via csv) into excel and worked there. Tasks can be expanded or created under stories. As conversations happen they can be easily shifted in Excel to accommodate, at the end of the sprint it can be imported. 

The queries main purpose is to list out stories, tasks, and defects in the sprint sorted by Rank (we have our own Rank field) and hierarchy. Here's an example of how I'd like to output to look (there will be more columns than this with support information that can be viewed/managed)

Rank Parent ID Type Summary
1         Feature 1 1 Story This is a story with some existing tasks
-         Story 1 2 Task         This is a task under story 1 (Tasks don't have rank)
-         Story 1 3 Task         Another task under story 1
2         Feature 1         4 Story This is a story that doesn't have any tasks (most will be like this)
3         Feature 2         5 Story Another story with no tasks
4         Feature 3         6 Story Story with 1 task
-         Story 6 7 Task         Task under story 6
-         --         8 Defect Defect Summary (doesn't matter if defects are grouped top or bottom of list)
-         --         9 Defect Defect Summary
-         --         10 Defect Defect Summary

Is this possible? I'm doing this through the online RTC site. 

Thank you.

One answer



permanent link
Jamie Pompu (211) | answered Apr 17 '19, 11:16 a.m.

 Sorry the example got messed up after I posted the question. I would upload an image or something more readable but apparently I don't have permission to do that.... Going to try it again with HTML table tags:

Rank Parent ID Type Summary
1 Feature 1 1 Story This is a story with some existing tasks
- Story 1 2 Task This is a task under story 1 (Tasks don't have rank)
- Story 1 3 Task Another task under story 1
2 Feature 1 4 Story This is a story that doesn't have any tasks (most will be like this)
3 Feature 2 5 Story Another story with no tasks
4 Feature 3 6 Story Story with 1 task
- Story 6 7 Task Task under story 6
- --- 8 Defect Defect Summary (doesn't matter if defects are grouped top or bottom of list)
- --- 9 Defect Defect Summary
- --- 10 Defect Defect Summary

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.