user1254579
user1254579

Reputation: 4009

How to merge 2 tasks contents into one in Azure Devops

There are 2 tasks under the same work item. The tasks need to be merged into one. How to do this in Azure DevOps

Upvotes: 1

Views: 3210

Answers (1)

Frank Wang-MSFT
Frank Wang-MSFT

Reputation: 1407

Azure DevOps doesn't have the feature that can merge work items. So you should manually copy the content from one task to another. Or you can use REST API to get the contents from one work item and then add the useful contents to another one. Here is the REST API to get single work item.

GET https://dev.azure.com/{orgname}/{projectname}/_apis/wit/workitems/{workitemId}?api-version=5.1

Here is the REST API to update the specific work item.

PATCH https://dev.azure.com/{orgname}/{projectname}/_apis/wit/workitems/{workitemId}?api-version=5.1

Here is the request body when you update the work item.

[
  {
    "op": "add",
    "path": "/relations/-",
    "value": {
      "rel": "Hyperlink",
      "url": "http://blogs.msdn.com/b/bharry/archive/2014/05/12/a-new-api-for-visual-studio-online.aspx"
    }
  }
]

More detail information about the parameters op, you can refer to https://learn.microsoft.com/zh-cn/rest/api/azure/devops/wit/work%20items/update?view=azure-devops-rest-5.1#examples

Upvotes: 1

Related Questions