Skip to content

Queue a pipeline when a work item is completed in Azure DevOps

  • Azure DevOps
  • Automation
  • Pipelines
  • Pipeline
  • State

When a work item is completed (Closed or Done), queue a pipeline in Azure DevOps.

Use the Queue a pipeline when a work item is completed template in Documentero Automations. Each completed work item queues its own run. You choose which pipeline before you enable it.

Queue a pipeline when a work item is completed flow overview
Flow overview: work item state changes, then State is Completed, then queue a pipeline.

Prerequisite: Install Automations App on your Azure DevOps organization

Trigger

Trigger — Work Item Update

Fires when a work item field changes. Links and comments do not start it. This template watches the State field so it runs when status changes, not on unrelated edits.

Configured in this template

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

You can customize

  • Limit the trigger to the work item types that should queue a run.
  • Leave Changed fields on State so other edits do not queue a pipeline.
Queue a pipeline when a work item is completed trigger
Work Item Update trigger watching the State field for all work item types.
Condition

Condition — Work item fields

Continues only when this work item’s State is in the Completed category, such as Closed or Done, including custom state names mapped to that category. If the check fails, later steps are skipped.

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: (none)

You can customize

  • Change the state category if a different status should queue the pipeline.
  • Add another field check, such as work item type or area, if only some completed items should run.
Queue a pipeline when a work item is completed condition 1
Condition that continues when State is in the Completed category.
Action

Action — Run pipeline

Queues a pipeline and continues without waiting for the run to finish. YAML and classic builds both work. The pipeline uses the branch and parameters saved on it unless you set them here.

Configured in this template

  • Parameters: (none)

You can customize

  • Select the pipeline to queue. The builder blocks enable until a pipeline is chosen.
  • Set a branch, or leave Default branch to use the pipeline’s saved branch.
  • Add YAML parameters if the pipeline expects them. Classic builds ignore parameters.
Queue a pipeline when a work item is completed action 1
Run pipeline action with the pipeline still to select and Default branch.

Full automation

Queue a pipeline when a work item is completed full automation
Full builder canvas for queuing a pipeline when a work item is completed.

Common questions

How do I queue a pipeline when a work item is completed in Azure DevOps?
When a work item is completed (Closed or Done), queue a pipeline in Azure DevOps. Use the Queue a pipeline when a work item is completed template in Documentero Automations: open Templates, pick this flow, choose the pipeline, and enable it.
Which field do I have to fill in before enabling this automation?
Select the pipeline on Run pipeline. The builder blocks enable until that value is set.
Does every completed work item start its own run?
Yes. Each work item that changes to a Completed state, such as Closed or Done, queues its own run.
Does the automation wait until the pipeline finishes?
No. Run pipeline queues the run and continues. It does not wait for the result.

Visual Studio Marketplace

Automations

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

Get it free