loading...
Cover image for How to automatically update the state of a work item in Azure when a PR is merged.

How to automatically update the state of a work item in Azure when a PR is merged.

austinblade profile image Austin Blade ・1 min read

This is a handy bit of knowlege that I had trouble finding, so I'm putting this out there in hopes of making it a bit easier to find.

Ever have trouble maintaining the state of work items through your work processes? For my team, after a pull request is completed, it was the responsibility of the person who approved the request to change the status of the associated work items once the PR was completed. That work item's state change then lets our tester know that it's time for him to test. As developers, we frequently have multiple things going on and can sometimes forget little things like updating the state of a work item. However, forgetting something like that could cost the team lots of time.

An excellent solution to this is to utilize Azure's feature that allows you to set the work items to your desired state when the PR is merged and completed.

All you need to do is include the state value followed by a #mention of the work items in the PR's description.

example PR description

In this example, we are setting two user stories to Resolved and closing two tasks.

That's all there is to it! Once the PR is completed, the state of those work items will update automatically!

Discussion

pic
Editor guide