Forum Discussion
MarkYoung345
Jul 06, 2023Copper Contributor
Automatically setting an item's state upon pull request merge
Hi there,
I have setup a number of states in Azure Devops related to both development and QA. When a pull request is approved and merged into main branch, is there a way I can specify which state the user story or bug is placed into? I have a "Ready for QA" state that I would like it placed into.
The system appears to be doing this at the moment, but it always goes to a completed state. I can't see any settings surrounding this. Please help, thanks
Mark.
2 Replies
- harieCopper Contributor
To fix this, you need to change the settings for your repository's branch policy.
- Go to Project Settings in your Azure DevOps project.
- In the menu on the left, select "Repositories."
- Choose the specific repository you're working with.
- Click on the "Policies" tab.
- On the right, find the policy for your main branch. Click on the three dots and select "Edit policy."
- Scroll down to the "Work item transitions" section.
- Here, you will see a dropdown menu. Change the option from "Complete the linked work items after merging" to your desired state, which is "Ready for QA".
Save the changes, and your pull requests should now transition the work item to the correct state automatically.