capabilities.work

Bug Triage by WIQL Query

A 3-step recipe with Azure DevOps. We can help you get access.

Recipe · 3 steps

Bug Triage by WIQL Query

Query bugs with WIQL, then fetch and triage the top match.

  1. Execute the WIQL query and capture the first matching work item ID. The WIQL endpoint accepts a plain JSON body with a single query property.
  2. Fetch the full work item for the top match so the current fields are available before applying triage changes.
  3. Apply a JSON Patch document that transitions the work item state and sets its priority, completing the triage action.
What you'll need to have ready
  • apiVersion: Azure DevOps REST API version (e.g. 7.1).
  • query: A WIQL query string selecting work items to triage.
  • triageState: State to transition the matched work item to (e.g. Active).
  • priority: Microsoft.VSTS.Common.Priority value to set (e.g. 1).
  • accessToken: Azure DevOps bearer (OAuth 2.0) access token.
For your developer

Arazzo workflow microsoft-azure-devops:bug-triage-by-wiql, 3 operations: workItems_queryByWiql → workItems_get → workItems_update. Specs on APIs.io.