0
votes

I'm using the documentation here: https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/create?view=azure-devops-rest-6.0#operation

and seem to be unable to pass data to a fields object.

In my Azure DevOps, I have a custom field on my work items (Epics, tasks, etc.) called SSFKID.

Using Postman, I'm sending the following to the API endpoint.

[
  {
    "op": "add",
    "path": "/fields/System.Title",
    "from": null,
    "value": "Sample task 3",
    fields: [
        {"System.SSFKID" : 12345}
    ]
  }
]

I am getting 200 responses, however, when I go to ADO UI and check the work item, the SSFKID field is not populated, so there is probably something wrong with my syntax. I'm not finding any documentation on how to do this. Any assistance?

1
Hi, any update about this issue?Mr Qian

1 Answers

0
votes

I think you should use this:

new
{
      "op" = "add",
      "path" = "/fields/Custom.SSFKID",
      "from": null,
      "value" = "12345"
},

You should not add this wrong path. You should remove it:

fields: [
        {"System.SSFKID" : 12345}
    ]