title: Azure DevOps query for work items if any parent is in progress
body: <p>I'm working on identifying all of our product backlog items that do not have a story point estimation. However, we have so many PBI(product backlog items) right now that need estimating. It is simply a mess. I need a query to help scop down the work. I know how to create an Azure DevOps query such that I return all the product backlog items which are <em>new</em> which do not have a value for <em>effort</em>.</p>
  
  <p>That <strong>wiql</strong> looks like this </p>
  
  <pre><code>SELECT
      [System.Id],
      [System.WorkItemType],
      [System.Title],
      [System.AssignedTo],
      [System.State],
      [System.Tags],
      [Microsoft.VSTS.Scheduling.Effort]
  FROM workitems
  WHERE
      [System.TeamProject] = @project
      AND [System.WorkItemType] = 'Product Backlog Item'
      AND [System.State] = 'New'
      AND [Microsoft.VSTS.Scheduling.Effort] = ''
  </code></pre>
  
  <p>However, I need it to add one more step that filters out items that do not have a parent or grandparent in an active status.</p>
  
  <p><strong>Question :</strong> </p>
  
  <blockquote>
    <p>What is a query that I could use that work gives me only the <strong><em>“PBI”s</em></strong> I don't have an effort in the state <strong><em>new</em></strong> where one or more of their parents(recursive) has a state of <strong><em>in progress</em></strong> ?</p>
  </blockquote>