Azure DevOps Webhooks (Service Hooks) Missing Fields like Description or Repro Steps

江枫思渺然 提交于 2020-12-12 04:56:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!