WIQL 树查询从单个子 ID 获取所有父工作项?

WIQL tree query to get all parent work items from single child Id?

我有这个 WIQL...

Wiql wiql = new Wiql()
  {
    Query = string.Format("SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State]" +
                          " FROM WorkItemLinks" +
                          " WHERE Target.[System.TeamProject] = '{0}'" +
                          " AND Source.[System.Id] = {1}" +
                          " AND [System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward'" +
                          " mode(Recursive)", project, startingChildId)
  };

我想让它匹配这个 TFS 查询,其中特定工作项的所有父项都被放入树中,如下所示。

我的问题是我只从需要父工作项的情况下获取子工作项。我怎样才能向上遍历树而不是向下遍历树?我已经尝试将 System.Links.LinkType 切换到等效的父关系,但这样做会引发不受支持的错误。

检查下面的 WIQL:

select [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State]
 from WorkItemLinks
 where ([System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward')
  and (Target.[System.Id] = 4839)
 order by [System.Id]
 mode (Recursive, ReturnMatchingChildren)