Tech Practice

WIQL stands for Work Item Query Language, and it is used to query work items from Azure DevOps. Using this query we can query Work Item Details or Related Work Items. The WIQL syntax is used to execute the Query By Wiql REST API.

Here is the example to query the list of all child work items and sub-child work items for a give Parent work item Id.

WorkItemLinks links table will have the work items and its related work items.
To get child of child work items we have to use ?"mode (Recursive, ReturnMatchingChildren)".

  1. from WorkItemLinks

  2. where ([System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward')

  3. and (Target.[System.Id] = 1234)

  4. order by [System.Id]

  5. mode (Recursive, ReturnMatchingChildren)