You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Azure DevOps中实现任务/用户故事关闭时自动将Remaining Work设为0的方法咨询

Solution for Automatically Setting Remaining Work to 0 in Azure DevOps

Absolutely! You can fix both of these frustrating issues using Azure DevOps Work Item Rules—this is a built-in feature, and the TFS automation approaches you’ve seen are fully compatible with Azure DevOps (since Azure DevOps is the modern evolution of TFS). Let’s break down the step-by-step solutions for both scenarios:

1. Automatically Set Remaining Work to 0 When a Task is Marked Done

This directly addresses your pain point of forgetting to clear Remaining Work when closing tasks:

  • Open your Azure DevOps project, click the gear icon in the bottom left to access Project Settings.
  • Navigate to Boards > Process, then select the process your team uses (e.g., Scrum, Agile, or a custom inherited process).
  • Find the Task work item type in the list and click to open its configuration.
  • Switch to the Rules tab, then click New rule.
  • Configure the rule like this:
    • When: The State field changes to Done (or your team’s equivalent completed state, like Closed).
    • Then: Set the Remaining Work field to 0.
    • (Optional) Add a condition to only trigger if Remaining Work isn’t already 0, but this isn’t strictly necessary—setting it to 0 again won’t cause issues.
  • Save the rule. From now on, any task marked as Done will automatically have its Remaining Work reset to 0, keeping your Burn Down Chart accurate.

2. Automatically Close Sub-Tasks and Clear Their Remaining Work When Closing a User Story

This solves the problem of leaving sub-tasks open when closing a parent User Story:

  • Stay in the same Process configuration page from the steps above.
  • Find the User Story work item type and open its configuration.
  • Go to the Rules tab and click New rule.
  • Build the rule with these components:
    • When: The State field changes to Closed (or your team’s final state for completed stories).
    • Then: Add two actions:
      1. For all child work items (select Tasks here), set their State to Done.
      2. For all child work items (select Tasks), set their Remaining Work to 0.
  • Save the rule. Now, whenever you mark a User Story as Closed, all its linked tasks will be automatically marked Done and their Remaining Work cleared—no more manual cleanup!

Additional Notes

  • These rules work in real-time and require no external scripts or tools. They’re perfect for standard team workflows.
  • If you’re using a legacy "hosted XML process", you’ll need to convert it to an inherited process first to edit rules (most teams use inherited processes by default now).
  • Test the rules with a dummy User Story and task to confirm everything works as expected before rolling out to your team.

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

火山引擎 最新活动