all
I want to associated work items with the changeset for Azure DevOps Services (TFS) via REST API. I have been successful in creating a changeset, but if I try also to link a work item to it, nothing happened, the changeset is created without linked work item
Postman console:
POST https://dev.azure.com/{organization}/{project}/_apis/tfvc/changesets?api-version=7.1-preview
{
"changes":[
{
"item":{
"path":"$/TFVCPath/archive.zip",
"version":60404,
"contentMetadata":{
"encoding":-1
}
},
"changeType":"edit",
"newContent":{
"content":"base64",
"contentType":"base64Encoded"
}
}
],
"workItems": [
{
"id": 390074,
"assignedTo": "Roman Konrad",
"state": "In Progress",
"title": "Title",
"workItemType": "task",
"url": "https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/390074",
"webUrl": "https://dev.azure.com/{organization}/{project}/_workitems/edit/390074/"
}
],
"comment":"File from postman"
}
Response: 201 created
I also tried different properties combination of workItems json object and API versions
Any ideas?
Tried it, it doesn't work. As a workaround, you can call Work Items - Update rest api to associate work item with changeset (TFVC).
Once the changeset is created, you can get the
changeset ID, then associate the work items with the changeset ID.Below PowerShell for your reference: