Luciano Gaube
Luciano Gaube

Reputation: 33

Could not find "Estimated Work" field in Azure DevOps REST API

I am sending a POST request to create a task in the Azure DevOps via REST API,

but I could not find the field "Estimated Work" and I really need to populate it.

Any help with this?

Checking the documentation I could only find those 3 related to estimates:

enter image description here

But my version has this:

enter image description here

Upvotes: 0

Views: 2737

Answers (3)

Luciano Gaube
Luciano Gaube

Reputation: 33

Thanks for the answers guys, I found out that this specific field is a Custom field in my project, as you can see in the Updated screenshot of the mouse hover Field Name, I was trying to set it but it was not updating using "OriginalEstimate",

so I've changed it to:

new
{
      op = "add",
      path = "/fields/Custom.EstimatedWork",
      value = 4
},

Upvotes: 0

LoLance
LoLance

Reputation: 28156

Agree with Shayki and just to add some details with related doc and how to call the rest api:

Original Estimate represents the amount of estimated work required to complete a task. Typically, this field doesn't change after it is assigned. You can check Fill out the task form .

1.HTTP: POST https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/$task?api-version=5.1

2.Request Body(application/json-patch+json):

[
  {
    "op": "add",
    "path": "/fields/System.Title",
    "from": null,
    "value": "MyTask"
  },
  {
    "op": "add",
    "path": "/fields/Microsoft.VSTS.Scheduling.OriginalEstimate",
    "from": null,
    "value": "15"
  }
]

Then one task with name MyTask will be created, and its Estimated Work should be 15. (Only the value element above need to be changed when creating new work items)

Upvotes: 2

Shayki Abramczyk
Shayki Abramczyk

Reputation: 41605

The field Estimated Work is the Original Estimate field, the 'Estimated Work' it's just a label, but behind the scenes, the field is: Microsoft.VSVS.Scheduling.OriginalEstimate.

You can hove with the mouse on the Estimated Work label and see in the pop-up the real field name.

Upvotes: 3

Related Questions