I'm building a Widget in VSTS and I'm calling the queryByWiql() method from Work Item Tracking rest client.
The query I have is:
queryString = {
"query": "Select [Microsoft.VSTS.Scheduling.RemainingWork]
From WorkItems
Where [System.WorkItemType] = 'Task'
AND [System.State] <> 'Done'
order by [System.CreatedDate] desc"
};
But the result looks like this, where none of the work item actually contain the Remaining Work Information:
This is true for any fields I request; Title, State, Assigned To etc. The fields I've requested will appear under columns. But none of the work items themvselves will have the information.
Why is this the case? And how can I fix it? Cheers
This is an expected behavior. Currently, there is no way to call the API to return the detailed work item information from a WIQL query directly. You need to get these information in two steps:
Instruction on WIQL Query page:
After executing a query, get the work items using the IDs that are returned in the query results response. You can get up to 200 work items at a time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With