Loading...

A Faster Way to Query Work Items in Azure DevOps (That I Wish I Knew Sooner)

Stop wrestling with the clunky Azure DevOps query UI. Discover how a free marketplace extension combined with a simple AI prompt can help you find work items in seconds. AI Prompt Template included!

Published on
6 mins read
Authors

We’ve all been there. You're deep inside Azure DevOps, trying to hunt down a specific set of user stories or bugs. You open the query editor. You start clicking dropdowns, adding clauses, remembering field names. And oh, don't forget to set the Query type to "Tree of work items", oh and at the bottom set the Type of Tree to "Parent/Child".

Every single time. It’s frustrating. Especially when the request is complex.

You know the data is in there, but getting it out feels like a chore. For years, I just accepted this as part of the process.

Then, I stumbled upon a method that is so much faster, it almost feels like cheating. It combines a free marketplace extension with the power of AI, and it completely changes how I find work items.

The WIQL Playground

The Problem with the Standard Query Editor

The default query editor in Azure DevOps is powerful, but it’s not always fast. For simple queries like "show me all active bugs assigned to me," it’s perfect.

But what about something more complex?

  • "Find all Features that don't belong to a specific team..."
  • "...and have a child Task with 'API' in the title..."
  • "...that was completed in the last sprint."

Building that in the UI involves a lot of clicking, grouping clauses, and trial and error. It pulls you out of your flow and wastes valuable time.

My "Aha!" Moment: The WIQL Playground

My perspective shifted when I found a free extension in the Visual Studio Marketplace called WIQL Playground.

WIQL stands for Work Item Query Language. Think of it as a simplified version of SQL, but designed specifically to query work items in Azure DevOps. It uses the familiar SELECT, FROM, WHERE, and ORDER BY structure.

Now, it has some limitations. You can't do complex JOIN operations like in SQL, and some field operators are restricted. For instance, the CONTAINS operator works for text fields but not for something like an Area Path.

But for 95% of my needs, it's more than enough. The ability to write a query textually is just faster than clicking through menus.

The Real Secret: Adding AI to the Mix

Here’s where it gets really good. You don't actually have to learn the WIQL syntax yourself.

This is the trick: Use an AI assistant like Microsoft Copilot or ChatGPT to write the query for you.

You can describe exactly what you need in plain English, and the AI will generate the precise WIQL code. You just copy and paste. This turns a 10-minute task into a 30-second one. It's a perfect way to streamline your devops workflow.

A Real-World Example: From Request to Result

Let's walk through a scenario I faced recently. A project manager needed a very specific list.

The Scenario

The request was to find all work items of type 'Process' that are not under the 'DEV' Area Path, but have a child 'Feature' with either 'Data Migration' or 'Integration' in the title.

Building this with the standard tree query UI would have been painful. But with this new method, it was incredibly simple.

Step 1: Install the WIQL Playground

First things first, you need the extension. If you're an admin for your Azure DevOps organization, you can add it for free.

  1. Go to the WIQL Playground page in the Visual Studio Marketplace.
  2. Click "Get it free" and follow the installation prompts.

Once installed, you'll see a new "WIQL Playground" option under the Boards menu.

Step 2: Craft Your Natural Language Prompt

Next, I opened my AI assistant and gave it a clear, simple prompt. You don't need to be overly technical.

Here's the prompt I used:

You are an expert in Azure DevOps Work Item Query Language (WIQL). Convert the following natural language request into a valid WIQL query.

Requirements:
- Use correct WIQL syntax.
- Include SELECT, FROM, WHERE, and ORDER BY clauses as needed.
- Ensure field names use the proper Azure DevOps schema (e.g., [System.WorkItemType], [System.Title], [System.AreaPath]).
- If hierarchy or link conditions are mentioned (e.g., parent/child relationships), use the appropriate WIQL constructs like links queries.
- Do not include any explanation—only return the WIQL query.

Natural language request:
I want to find work items of type "Process", that are not under the area path "DEV", but that have as a children work item type = Feature with a title either "Data Migration" or "Integration"

Within seconds, the AI provided the WIQL code.

Create DevOps Queries with AI

Step 3: Run the Query

Now for the final step.

  1. In Azure DevOps, navigate to Boards > WIQL Playground.
  2. Paste the code from your AI assistant into the editor.
  3. Click Run.
DevOps WIQL Playground

You'll see a preliminary list of results. But here's the best part: look for the "Open in Queries" button.

When you click this, it takes the WIQL code and converts it into a standard query in the regular editor. This is fantastic for two reasons:

  • You see the results in the clean, familiar Azure DevOps format.
  • You can see exactly how the query was built in the UI, helping you learn how to construct complex queries for the future.
DevOps Query Editor

Why This Is a Better Way to Work

This simple workflow has saved me a ton of time. When I need to find work items, I no longer dread opening the query editor. I just state what I need in plain English, paste the code, and get my results.

It allows you to focus on the intent of your search, not the mechanics of the tool. You can answer complex questions and pull specific data sets in a fraction of the time. If you spend any significant amount of time in Azure DevOps, this is a technique you should try today.

We would love to hear your thoughts and opinions in the comment section below!