Hello,
My creating a flow which grabs values off of a SharePoint (coming from PowerApps) and creating an work item in Azure DevOps. When I use "Create a work item (Azure DevOps)". Even though I leave the "Assigned To" (under Show Advanced Options) it assigns the task to me.
Gone through this thread: Solved: Re: Azure Devops Connector - Create Work Item for ... - Power Platform Community (microsoft.com)
I have to added "Send a HTTP request to Azure DevOps" after "Create a work item (Azure DevOps)" with the following:
Relative URI: {Project name}/_apis/wit/workitems/$issue?api-version=7.1-preview.3
Headers: Content-Type: application/json-patch+json
Body:
{
"op":"add",
"path":"/fields/System.AssignedTo",
"from":null,
"value":""
}
The error I get is:
I want to create a work item with the following:
Type: Issue
Description field should have the following data from SharePoint: (Priority, Created By, Email)
Link URL: URL column from SharePoint
Assigned To: null
State: New
This is what I have now:
[
{
"op": "add",
"path": "/fields/System.Title",
"from": null,
"value": "sample"
},
{
"op": "add",
"path": "/fields/System.AssignedTo",
"from": null,
"value": ""
},
{
"op": "add",
"path": "/fields/System.Description",
"from": null,
"value": "Description: unassigned"
},
{
"op": "add",
"path": "/fields/System.Link URL",
"from": null,
"value": "bi assigned"
}
]
and the error message now:
Hi @mnshah,
The body seems to be missing the square brackets. Also it looks like you haven't included a Title for your work item. Afaik that property is is required to be able to save a new work item.
Can you try the below as the setup with that Body payload?
URI
@{variables('Project')}/_apis/wit/workitems/$Issue?api-version=7.1-preview.3
Headers
{
"Content-Type": "application/json-patch+json"
}
Body
[
{
"op": "add",
"path": "/fields/System.Title",
"from": null,
"value": "Sample Issue"
},
{
"op": "add",
"path": "/fields/System.AssignedTo",
"from": null,
"value": ""
}
]
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional