RoarG
RoarG

Reputation: 823

Is it possible to make workitem inherit parent iteration path?

When setting up Epic, Feature, Stories in VSTS I am using iteration with planning. When using the plan feature in VSTS you need to set the iteration for for each of the displayed lanes(i.e Feature and Epic)

Is it possible to make the child inherit the iteration path of the parent when associating with a new parent?

Upvotes: 2

Views: 2649

Answers (2)

starian chen-MSFT
starian chen-MSFT

Reputation: 33698

You also can do it with WebHooks.

Simple workflow:

  1. Build a Api app (e.g. asp.net web api) to update work item per to parent work item through REST API (Work Items REST API)
  2. Create a Webhook with Work item created event or Work item updated event with iteration path filter
  3. Specify the Api URL (step 1) and other settings

Upvotes: 1

jessehouwing
jessehouwing

Reputation: 114581

By default, no. You can setup the TFS Aggregator Hosted version though (https://marketplace.visualstudio.com/items?itemName=tfsaggregatorteam.tfs-aggregator-web-service) it will trigger after a work item is created or saved and can apply certain rules (like copying fields from a parent to a child). These changes will be applied after save and there are a few places in the UI of VSTS that will require users to manually refresh to see these automatic changes.

The auto-open / auto-close example shows interaction between parent-child work items and can serve as a startingpoint.

<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>

Upvotes: 0

Related Questions