1

In ADO I have a single parent work item with child work items. The children work items, in turn have related work items. The number of child items will grow as time progresses.

What I'm trying to get is the list of the related work items. This would be pretty trivial if the list of child work items wasn't growing, but I don't want to have to edit a simple tree query by adding a new work item ID to the top level of the query whenever a new child work item is created.

Is there a way in WIQL that I can write a query that effectively says, "get the children of item #xxxxx, then get the related items for each of those children?"

Chris
  • 352
  • 1
  • 6
  • 16
  • Did you find any solution? – Baequiraheal Sep 10 '20 at 10:57
  • @Baequiraheal, not one that I was really able to use.Someone directed me to ADO Analytics and said that I could use those results in PowerBI, but I needed to do it in ADO for it to be useful for my audience. So I didn't check it out to see if/how it works in PBI. What I did find out was that you can't do nested queries or sub-queries directly in WIQL, so if this is something you need, you'll need to look into ADO Analytics in conjunction with the PBI (or Odata) functionality. – Chris Sep 12 '20 at 21:53

1 Answers1

0

If you have a single known parent that will never change, all you need to do is create a query with the following parameters:

  1. Type of query: Tree of work items
  2. Type of tree: Parent/Child

In your filters for top level work items, specify the parent work item ID. In your filters for linked work items, don't specify anything. All work items that live below the parent will be returned, with the parent at the top of the query.

enter image description here