Skip to content

Close parent when all children are completed in Azure DevOps

  • Azure DevOps
  • Automation
  • Parent & Child
  • Parent / child
Close parent when all children are completed flow overview
Overview of the automation flow for closing parent work items when all children are completed.

When a child moves to Completed (Closed or Done), if all siblings are also Completed, set the parent to Completed for its work item type in Azure DevOps.

Use this template to maintain accurate project tracking by updating parent work items based on the status of their child items. This helps in managing dependencies and ensuring that project progress is reflected accurately.

Prerequisite: Install Automations App on your Azure DevOps organization

Create an automation from the Close parent when all children are completed template, or start from scratch
Go to Project → Automations → Create automation from template Close parent when all children are completed or Start from scratch.
Trigger

Trigger — Work Item Update

This trigger activates when a work item's field changes, specifically monitoring the State field. It does not include changes to links or comments.

Configured in this template

  • Work item types: all (no filter)
  • Changed fields (optional filter): State

You can customize

  • Filter specific work item types if only certain types should trigger the automation.
  • Add additional fields to monitor if other changes should trigger the flow.
Close parent when all children are completed trigger
Trigger setup to detect changes in the State field of any work item.
Condition

Condition — Work item fields

This condition checks if the current work item's State is marked as Completed. It also verifies that all sibling work items have the same Completed status.

Configured in this template

  • Check: This work item
  • Require: All of Items
  • Field conditions: State = state category Completed (Closed, Done, …)
  • Match logic: All conditions must match (AND)
  • Related work item conditions:
  • - siblings: all match the nested conditions
  • - State = state category Completed (Closed, Done, …)

You can customize

  • Adjust the State condition to include additional states if your workflow uses custom state categories.
  • Modify the logic to include or exclude certain sibling conditions based on project needs.
Close parent when all children are completed condition 1
Condition setup to ensure all sibling work items are completed before updating the parent.
Action

Action — Update Work Item

This action updates the parent work item's State to Completed once all child work items meet the completion criteria.

Configured in this template

  • Work on: Parent of trigger
  • Field updates: State = state category Completed (Closed, Done, …)

You can customize

  • Change the field updates to reflect different state categories if your project uses custom states.
  • Include additional field updates if other parent work item fields need to be changed.
Close parent when all children are completed action 1
Action setup to update the parent work item to Completed.

Full automation

Close parent when all children are completed full automation
Full view of the automation flow to close parent items when all children are completed.

Common questions

How do I close parent when all children are completed in Azure DevOps?
When a child moves to Completed (Closed or Done), if all siblings are also Completed, set the parent to Completed for its work item type in Azure DevOps. Use the Close parent when all children are completed template in Documentero Automations: open Templates, pick this flow, fill the required fields, and enable it.
What fields are required to enable this automation?
All fields in the template must be filled with valid values before enabling the automation. Ensure the State field is correctly set.
Can I change the work item types this automation applies to?
Yes, you can customize the trigger to filter specific work item types based on your project requirements.
How can I test this automation?
Create test work items that simulate your project structure and manually change their states to see if the parent updates as expected.
Does this automation run on a schedule?
No, this automation runs in response to work item updates, specifically changes to the State field.

Visual Studio Marketplace

Automations

Documentero · Preview

Automate Azure DevOps workflows with triggers, actions, conditions, and scheduled rules.

Get it free