是否有可能使workitem继承父迭代路径?

时间:2018-01-05 12:20:44

标签: azure-devops

在VSTS中设置Epic,Feature,Stories时我正在使用迭代计划。在VSTS中使用计划功能时,您需要为每个显示的通道设置迭代(即功能和史诗)

是否可以在与新父级关联时让子级继承父级的迭代路径?

2 个答案:

答案 0 :(得分:1)

您也可以使用WebHooks

简单的工作流程:

  1. 构建Api应用程序(例如asp.net web api),通过REST API(Work Items REST API)将每个工作项更新为父工作项
  2. 使用迭代路径过滤器
  3. 创建带有工作项创建事件或工作项更新事件的Webhook
  4. 指定Api URL(步骤1)和其他设置

答案 1 :(得分:0)

默认情况下,没有。您可以设置TFS聚合器托管版本(https://marketplace.visualstudio.com/items?itemName=tfsaggregatorteam.tfs-aggregator-web-service),它将在创建或保存工作项后触发,并可以应用某些规则(如将字段从父项复制到子项)。这些更改将在保存后应用,并且VSTS的UI中有一些位置需要用户手动刷新才能看到这些自动更改。

auto-open / auto-close example显示父子工作项之间的互动,可以作为起始点。

<rule name="AutoOpen" appliesTo="Task">
    <!-- Update Work Item to Committed if a task became "active" -->
    <![CDATA[
    if (new[] {"In Progress", "To Do"}.Contains((string)self["System.State"]))
    {
        if(self.HasParent() && ((string)self.Parent["System.State"]) != "Committed")
        {
            self.Parent.TransitionToState("Committed", "Auto Activated");
        }
    }
    ]]>
</rule>

<rule name="AutoClose" appliesTo="Task">
    <!-- Update Work Item to Done if a all child tasks are Done or Removed -->
    <![CDATA[
    if ((string)self["System.State"] == "Done" && self.HasParent() && ((string)self.Parent["System.State"]) != "Done")
    {
        if (self.Parent.Children.All(child => new[] {"Removed", "Done"}.Contains((string)child["System.State"])))
        {
            self.Parent.TransitionToState("Done", "Auto done");
        }
    }
    ]]>
</rule>