Tag related work items when a pipeline stage succeeds in Azure DevOps
When a pipeline stage succeeds, add the tag deployed to the related work items from that run in Azure DevOps.
Use the Tag related work items when a pipeline stage succeeds template in Documentero Automations. You choose which pipeline and which stage before you enable it.
Prerequisite: Install Automations App on your Azure DevOps organization
Trigger — Pipeline stage state changed
This step runs when a YAML stage starts or finishes. This template starts only when the stage is Completed and the result is Succeeded. Classic builds do not have stages; use Run state changed for those.
Configured in this template
- Stage state: Completed
- Result: Succeeded
You can customize
- Choose the pipeline and stage this rule should watch.
- Change the result if you want a tag for a different stage outcome.
Get — Get pipeline work items
Loads the work items shown as Related on the run. If that list is empty, this step reads the work items linked to the run’s changes. It uses Read pipelines and work item access, not the code repository. If those changes are not ready yet, it waits until the run finishes. Work items in another project are left out.
You can customize
- Later steps update the items this Get returns. Work items in another project are not included.
Action — Update Tags
Adds the tag deployed to each work item returned by Get. Other tags on those work items stay as they are.
Configured in this template
- Work on: Items from Get
- Update: Add specific tags
- Tags: deployed
You can customize
- Replace deployed with a tag name your team already uses.
- Add more tags in the same step if the stage should mark work in more than one way.
Full automation
Common questions
How do I tag related work items when a pipeline stage succeeds in Azure DevOps?
Which fields do I have to fill in before enabling this automation?
Does this work for classic builds?
Which work items get the tag?
Visual Studio Marketplace
Automations
Automate Azure DevOps workflows with triggers, actions, conditions, and scheduled rules.