问题
I am working on ASP.NET Core 5 project, which will use a subscription to my organization's Azure DevOps Service Hooks (Webhooks). I will analyze event payload's data (and metadata).
I checked what event payloads contains from here: https://docs.microsoft.com/en-us/azure/devops/service-hooks/events?view=azure-devops#workitem.updated
And also downloaded this NuGet package: https://www.nuget.org/packages/Microsoft.AspNet.WebHooks.Receivers.vsts
But there is a problem. I cannot find (in the docs and also in the NuGet package) Work Item's "Description" field or Bug's "Repro Steps" fields. These two fields are most important fields from payload for my project.
Are these fields hidden somewhere? Or is possible to include these fields in payload?
回答1:
After querying Work Item Types Field - List rest api which used to get a list of fields for a work item type with detailed references.
{
"alwaysRequired": false,
"defaultValue": null,
"allowedValues": [],
"dependentFields": [],
"referenceName": "System.Description",
"name": "Description",
"url": "https://dev.azure.com/fabrikam/_apis/wit/fields/System.Description"
},
The referenceName of Description field should be System.Description
.
As you have pointed, seems this is not include in webhook event payload.
You may have to use work item Rest API to query corresponding info.
来源:https://stackoverflow.com/questions/64994783/azure-devops-webhooks-service-hooks-missing-fields-like-description-or-repro-s