You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VSTS查询:筛选同时关联Development与Deployment任务的PBI

How to Filter PBIs with Both Development and Deployment Tasks in Azure DevOps

Here's a straightforward, step-by-step guide to build the exact query you need:

  1. Start a new query

    • Navigate to your Azure DevOps project, go to Boards > Queries
    • Click New Query and select the Work Items and Direct Links query type—this lets you filter PBIs based on their linked tasks.
  2. Set up the top-level PBI filter

    • In the upper pane (labeled "Work items that match the following"), configure:
      • Work Item Type = Product Backlog Item (adjust this if your team uses a different name for PBIs, like User Story)
      • Add any extra filters you need (e.g., State != Closed) to narrow down active/relevant PBIs.
  3. Add linked task filters to enforce both activity types

    • In the lower pane (labeled "And linked work items that match the following"), we’ll set up two groups to ensure the PBI has at least one Development task AND one Deployment task:
      • Click Group to create your first filter group. Inside it, set:
        • Link Type = Child (use whatever link type your team uses between PBIs and tasks—Child is standard for parent-child task relationships)
        • Work Item Type = Task
        • Activity = Development
      • Click Add group to make a second filter group. Inside this one, set:
        • Link Type = Child
        • Work Item Type = Task
        • Activity = Deployment
      • Switch the logic between the two groups from OR to AND (use the dropdown next to the group headers)
      • At the top of the lower pane, set the link matching option to "Match all of the linked work item filters"—this ensures both task types must exist for the PBI to show up.
  4. Save and run your query

    • Name your query something descriptive (e.g., "PBIs with Both Dev and Deployment Tasks")
    • Hit Run—you’ll only see PBIs that have at least one Development task AND one Deployment task linked to them.

Quick Troubleshooting Note

If you’re not getting the right results, double-check:

  • The link type between PBIs and tasks matches what your team actually uses
  • The Activity field values exactly match how they’re set on your tasks (no typos or case mismatches)
  • The group logic is set to AND and the link matching option is set to "Match all"

内容的提问来源于stack exchange,提问作者Confused

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 06:31:20