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

如何在TFS Cloud编写查询统计近2个月每周关闭用户故事的故事点?

Absolutely! You can totally build this query and visualize it as a bar chart in your TFS Cloud (Azure DevOps Services) dashboard. Here's a step-by-step guide to make it happen:

Step 1: Create a Targeted Work Item Query
  1. Navigate to Boards > Queries in your TFS Cloud project.
  2. Create a new Flat query (this works best for aggregation scenarios like this).
  3. Set up these filter criteria:
    • Work Item Type = User Story
    • State = Closed
    • Closed Date >= @Today - 60 (this covers the past 2 months; use @Today - 56 for an exact 8-week window)
    • Optional: Story Points > 0 (to exclude user stories without story point values)
  4. Add the Closed Date and Story Points columns to your query (you can add others if needed, but these two are essential).
Step 2: Group & Aggregate Data by Week

Once your query returns the right set of user stories:

  1. Click the Group by button at the top of the results table.
  2. Select Closed Date, then choose Week from the submenu (this will cluster all closed items into weekly buckets).
  3. Next, click the Aggregate button, select Story Points, and pick Sum from the options. This will calculate the total story points for each week.
Step 3: Add the Bar Chart to Your Dashboard

Now it’s time to turn this aggregated data into your desired visualization:

  1. Open your target dashboard and click the Edit button in the top-right corner.
  2. Click Add widget, then search for and select the Chart widget.
  3. Configure the widget:
    • Data source: Choose the query you just created.
    • Chart type: Select Bar chart.
    • X-axis: Pick Closed Date (Week) to represent each week as a bar.
    • Y-axis: Select Sum of Story Points to show the total story points per week.
    • Title: Give it a clear name like "Weekly Closed User Story Story Points (Past 2 Months)".
  4. Save the widget and exit edit mode — your 8-bar chart should now be live on the dashboard!

Quick Notes

  • Ensure your user stories have filled-in Story Points values; blank entries won’t be included in the sum.
  • You can adjust the week start day (e.g., Monday vs. Sunday) via the group-by settings in your query if needed.
  • If you notice gaps in weeks where no user stories were closed, the chart will still display those weeks with a value of 0 (depending on your widget settings).

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.21 06:35:50