Skip to content

Instantly share code, notes, and snippets.

@JosiahSiegel
Last active May 17, 2024 14:39
Show Gist options
  • Save JosiahSiegel/265bcb27deba0083409f1ae4158721f6 to your computer and use it in GitHub Desktop.
Save JosiahSiegel/265bcb27deba0083409f1ae4158721f6 to your computer and use it in GitHub Desktop.
Azure DevOps (ADO) Assignments - Best Query (wiql)
SELECT
[System.State],
[System.Id],
[System.Title],
[System.IterationLevel2],
[Microsoft.VSTS.Common.ClosedDate]
FROM workitemLinks
WHERE
(
[Source].[System.TeamProject] = @project
AND [Source].[System.WorkItemType] <> ''
AND [Source].[System.State] <> ''
)
AND (
[System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward'
)
AND (
[Target].[System.TeamProject] = @project
AND [Target].[System.AssignedTo] = @me
AND [Target].[System.WorkItemType] <> ''
)
ORDER BY [System.IterationId] DESC,
[Microsoft.VSTS.Common.ClosedDate] DESC
MODE (Recursive, ReturnMatchingChildren)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment