Friday 25 September 2020

Set Work Item State on Pull Request Completion

Associated work items help to identify what is completed in a given pull request. If required while completing a pull request you could, set the associated work item to be moved to completed state. With the introduction of new feature, which we are discussing in this post, you would be able to set the work item state (regardless of it is associated work item or not for the pull request) to desired closed, in progress or resolved states based on description specification.

You can use couple of key words in the description of the pull request to specify the state. It could be state name and the work item would be set to the state. If you put the state category name work item state would be set to the first state of the category. Below table from Microsoft documentation shows the possible keyword to use.

Let’s try out with an example. In one of the pull requests below you can see multiple wok items are set as Fix.

Once the pull request is completed and merged you would be able to see the states changed as below. Notice while all user stories are closed but the bug work item is moved to resolved as described in the table from MSFT docs.

The user story shows the state change to closed due to the pull request completion.

Similarly, the bug work item history is showing due to the pull request completion the bug is moved to resolved state.

No comments:

Popular Posts