Skip to content

Create a parent story for orphan tasks in Azure DevOps

  • Azure DevOps
  • Automation
  • Parent & Child
  • Parent / child
Create a parent story for orphan tasks flow overview
Overview of the automation flow for creating a parent story for orphan tasks.

When a Task is created with no parent, create a User Story, link it as the parent, and copy Area and Iteration from the task in Azure DevOps.

You'll set the parent work item type and title before enabling this automation. This ensures that the created parent item meets your project's specific requirements.

Prerequisite: Install Automations App on your Azure DevOps organization

Create an automation from the Create a parent story for orphan tasks template, or start from scratch
Go to Project → Automations → Create automation from template Create a parent story for orphan tasks or Start from scratch.
Trigger

Trigger — Work Item Created

This step triggers the automation when a new Task is created in the project. It specifically listens for the creation of Task work items.

Configured in this template

  • Work item types: Task

You can customize

  • Change the work item type to include other types if needed, such as Bug or Feature.
Create a parent story for orphan tasks trigger
The trigger setup for detecting new Task work items.
Condition

Condition — Work item fields

This condition checks if the created Task has no parent. It ensures that the automation proceeds only when the Task is an orphan.

Configured in this template

  • Check: This work item
  • Require: All of Items
  • Field conditions: (none)
  • Match logic: All conditions must match (AND)
  • Related work item conditions: parent: none exist

You can customize

  • Add additional field conditions to further refine when this automation should run.
Create a parent story for orphan tasks condition 1
Condition setup to check for orphan tasks.
Action

Action — Create Work Item

This action creates a new work item, such as a User Story, and links it as the parent of the orphan Task. It copies the Area and Iteration from the Task to the new parent item.

Configured in this template

  • Work item type: all (no filter)
  • Link to trigger: Parent of trigger
  • Field values:
  • - Title = {trigger.Title}
  • - Area Path = {trigger.AreaPath}
  • - Iteration Path = {trigger.IterationPath}

You can customize

  • Set a specific work item type for the parent, like 'Product Backlog Item'.
  • Modify the title to include additional context or identifiers.
Create a parent story for orphan tasks action 1
Action setup to create and link a new parent work item.

Full automation

Create a parent story for orphan tasks full automation
Complete view of the automation setup for creating a parent story for orphan tasks.

Common questions

How do I create a parent story for orphan tasks in Azure DevOps?
When a Task is created with no parent, create a User Story, link it as the parent, and copy Area and Iteration from the task in Azure DevOps. Use the Create a parent story for orphan tasks template in Documentero Automations: open Templates, pick this flow, fill the required fields, and enable it.
What fields must be set before enabling this automation?
You need to specify the parent work item type and title before enabling the automation.
Can I change the work item type for the parent?
Yes, you can customize the work item type to match your project's needs, such as setting it to 'Product Backlog Item'.
How can I test this automation?
Create a test Task without a parent in your Azure DevOps project to see if the automation correctly creates and links a new parent work item.
Can I add additional conditions to this automation?
Yes, you can add more field conditions to the condition node to further refine when the automation should run.

Visual Studio Marketplace

Automations

Documentero · Preview

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

Get it free