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

如何在VSTS(Visual Studio)中获取处理过指定Bug的所有团队成员

Got it, let's sort out how to get all team members who worked on a specific batch of bugs from VSTS (now often referred to as Azure DevOps) history—since your initial query with the History keyword only returned a single user, here are a few reliable methods to pull the full list:

方法1:Web UI手动查看(适合少量Bug)

If you're dealing with just a handful of bugs, the VSTS web interface is straightforward:

  • Open the detail page for a target bug
  • Scroll down to the History panel—this lists every change made to the bug (status updates, comments, field edits, etc.)
  • Each entry shows the avatar and name of the person who made the change on the left side. You can manually compile these names, or use your browser's find function (Ctrl+F) to search for Changed by to quickly jump to each contributor.

For a larger batch of bugs, this gets tedious, so try the query or API methods below.

方法2:WIQL Query(批量获取首选)

The Work Item Query Language (WIQL) is way more flexible than basic keyword searches. You can build a query that extracts all unique users who modified your target bugs.

Single Bug Example

SELECT [System.ChangedBy]
FROM WorkItemHistory
WHERE [System.WorkItemId] = 1234 -- Replace with your bug ID
GROUP BY [System.ChangedBy]

This returns a deduplicated list of everyone who made changes to that bug.

Batch Bugs Example

If you need to target a group of bugs (e.g., a range of IDs, bugs in a specific iteration), adjust the WHERE clause:

SELECT [System.ChangedBy], [System.WorkItemId]
FROM WorkItemHistory
WHERE [System.WorkItemId] IN (1234, 1235, 1236) -- List your bug IDs here
OR [System.IterationPath] = 'YourProject\\Sprint 10' -- Or filter by iteration/area path
GROUP BY [System.ChangedBy], [System.WorkItemId]

Run this query, then export the results as a CSV. You can easily deduplicate the names in Excel or a text editor to get your full team member list.

How to Run WIQL:

  • Go to the Queries section in VSTS
  • Create a new Advanced Query (or "WIQL Query" depending on your version)
  • Paste in your query, replace the placeholders, and hit run.

方法3:REST API(适合自动化/脚本场景)

If you need to automate this process, use the VSTS REST API to pull history for each bug and extract the contributors.

Sample API Request (Single Bug)

GET https://dev.azure.com/YourOrg/YourProject/_apis/wit/workItems/1234/history?api-version=7.1-preview.3

The JSON response will include revisions—each revision has a fields.System.ChangedBy object with the user's name. You can use a script (PowerShell, Python, etc.) to loop through your bug IDs, collect all ChangedBy values, and deduplicate them.

Quick Notes:

  • Make sure you have Contributor or higher permissions to view work item history
  • Some changes might be triggered by system rules (auto-status updates, etc.)—these will show a system account as the ChangedBy user, so you can filter those out if needed.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.25 03:27:48