Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft VSTS Set Default Work Item State After Pull Request Completes

Tags:

azure-devops

I currently use Microsoft VSTS as my teams primary project management system and I have run into an issue. Currently we have user stories that we create pull requests against, once a pull request is completed the linked work item(s) get set to a "closed" stated instead of a "resolved" state. We do not currently have our test engineers tests out features/user stories in a separate environment that is defined by the pull request'ed code, we do all our acceptance testing in our development branch. Any help would be great.

like image 290
Piotr Zaremba Avatar asked Nov 01 '17 15:11

Piotr Zaremba


People also ask

How do I disable complete associated work items after merging?

You can also set it to be disabled by default. You could navigate to Project Settings -> Repositories -> Select target Repo -> Options and disable Remember user preferences for completing work items with pull requests option.

What happens after a pull request is approved?

Once the repository maintainer has approved a pull request, the developer's new updates in the forked repository are merged with the main project repository. The product is then updated with the new feature or bug fix, and can now be viewed by end users.

What is set auto complete in pull request?

Complete: Complete the PR now and merge the changes to the target branch. Set auto-complete: If you have branch policies, you can choose Set auto-complete to configure the PR to close once it meets all branch policies. Abandon: Close the PR without merging the changes.


1 Answers

we have user stories that we create pull requests against, once a pull request is completed the linked work item(s) get set to a "closed" stated instead of a "resolved" state.

The reason for the linked user stories state changed to closed once the PR completed it caused the Complete linked work items after merging option is selected. So once the PR is completed, the related linked work items state are changed to complete.

enter image description here

And you can find in state categories, that shows user story completed category for user story state is closed. So that’s why the state changed to closed instead of resolved.

enter image description here

If you want the linked work items state keep the same even the PR is completed, you just need to deselect the Complete linked work items after merging option when completing a PR.

enter image description here

like image 151
Marina Liu Avatar answered Sep 22 '22 12:09

Marina Liu