Forum Discussion

caseylide's avatar
caseylide
Frequent Visitor
4 years ago

Recently created datetime fields in Azure DevOps cause ODATA query failure - major issue

Hi. An "Unable to Connect" error is encountered when using Power BI Desktop ODATA Feed  to query of Azure DevOps Work Items. Here is a simple step-by-step to illustrate the unlikely issue:

 

1. Create a new Work Item type in Azure DevOps (ex: 'NewObject')

2. Add a custom datetime field to the 'NewObject' work item (ex: 'NewDatetime')

3. Open Power BI Desktop, select Get Data, then select oData Feed and enter the following query for all fields:

 

--> https://analytics.dev.azure.com/{org}/{project}/_odata/v3.0-preview/WorkItems? &$filter=WorkItemType eq 'NewObject' <--

 

4. Observe that the query returns a table for the 'NewObject' work item with all fields, including NewObject.Custom_NewDatetime as a date hierarchy observable in the UI.

5. Select Get Data, then select oData Feed and enter the following query for test fields:

 

--> https://analytics.dev.azure.com/{org}/{project}/_odata/v3.0-preview/WorkItems? &$filter=WorkItemType eq 'Outcome' &$select=WorkItemID,Custom_NewDatetime <--

 

6. Observe issue described below:

 

When a Power BI Desktop user adds a custom date time field to an Azure Work Item, the custom field can only be returned in an oData query for all fields; because, specifying the new custom field in the oData query returns an unexpected error. This is a relatvely new issue. I can run oData queries for custom datetime fields that I created in past months, but not for for custom datetime fields created this week. The error alert is pasted here:

 

Details: "OData: The property 'Custom_NewDatetime' does not exist on type 'Microsoft.VisualStudio.Services.Analytics.Model.WorkItem'. Make sure to only use property names that are defined by the type or mark the type as open type."

 

I hope these details help illustrate the issue for clear understanding so it can be easily resolved. Thanks.

 

2 Replies