Search code examples
azure-devopsazure-devops-rest-apiazure-devops-extensions

Accessing "Remaining Work" on PBI through REST API


On the sprint board in Azure DevOps the "Remaining work" value on tasks "roll up" to e.g. PBI's and are displayed on the PBI card. enter image description here

This value does not appear to be persisted on the "Remaining work" field on a PBI.

If I try to access this field through the REST API using

https://dev.azure.com/{myorg}/{project}/_apis/wit/workitems/{id}?fields=Microsoft.VSTS.Scheduling.RemainingWork&api-version=5.0-preview.3

... I get an empty value

enter image description here

(the "fields"-property)

Note: if I change the "Field name" specification in the URI to e.g. "System.Title", I get the correct value, so I assume the format of the URI is correct.

My question is:

Is the "Remaining work" field on e.g. a PBI available through the REST API's, or do I have to iterate over all child tasks to calculate it myself?

/Jesper


Solution

  • You are right in second option. Azure DevOps calculates "Remaining work" based on child tasks and iteration. So you have to get all child tasks and summarize "Remaining work". Or use external solutions like TFS Aggregator