I am using Git with Visual Studio and Azure DevOps. I am trying to complete a pull request and also change the ticket status.
Currently, you can do this by selecting the "Complete linked work items after merging". The problem is that this sets the status of the ticket to Done.
Is there any way for the ticket status to be set with a different option on the completion of the pull request?
It would also be nice to set a ticket status when you create a pull request...
In the "Pull Requests" list, click the pull request you'd like to modify. Next to the pull request's title, click Edit. In the base branch drop-down menu, select the base branch you'd like to compare changes against. Read the information about changing the base branch and click Change base.
Revert a completed pull requestOpen the completed PR and select Revert. This action creates a new branch with changes that undo the PR in an existing target branch in your repo. In the Revert pull request pane: Under Target branch, select the branch where you want to undo the PR changes.
You need to edit your code in your PR source branch and commit the changes in to update the PR, and If you are a reviewer of the pull request, you can a add comments to the review codes changes .
So this is actually in Azure Devops now - Set Work Item State in Pull Request
Don't use Complete linked work items after merging
if you don't want the Work Item to be closed. ;)
To set the status of Work Item 123 to resolved
instead of closed
, in your PR description write:
Resolved: #123
This feature is useful if you want change multiple tickets and uses the syntax {state value}: #ID
. For example, to close a Task and resolve a User Story at the same time.
Resolved: #123
Closed: #456
However it does rely on developers knowing and using the convention instead of it being a managed policy across the organisation.
Yes, agree with Shayki's answer. There does not such feature support by Azure Devops. Until now, this is a fixed option that you just can change it as completed while you complete the PR.
But, as work around, you can install an extension WorkItem Updater which can change work item while build executed. And then, add the task WorkItem Updater into your build. In that task, you can change it as any state you want.
I know, this is not convenience for you to achieve what you want.
But also, here has an UserVoice raised on Microsoft Developer Community which is our main forum for product feature suggestions : Customize Work Item State after PR is closed.
Note: You can vote and add your comment there. This UserVoice is already Under Review, I believe it will be meet soon.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With