stansw / vsts-open-in-powerbi

Visual Studio Team Services extension which allows users to open queries in Power BI.
MIT License
19 stars 8 forks source link

Not able to import VSTS tree queries and Direct links queries #6

Closed sriramdasbalaji closed 7 years ago

sriramdasbalaji commented 7 years ago

Hi

I am not able to import VSTS Work item Tree Queries/Direct links queries in Power BI. It is giving error as below Work Item Links Expresiion.Error: The field 'workitemrelations' of the record wasn't found

Is this the limitation? Do we have any alternate way to do this?

StanislawSwierc commented 7 years ago

@sriramdasbalaji, thank you for reporting this problem! I did some investigation. Extension expects that the payload will match the schema defined in the official documentation of the REST API, which in fact lists workItemRelations as mandatory field. I checked what happens when result is empty and the field is still present as an empty array.

Both direct and tree queries have been supported since the first version of this extension.

That said it does look like a genuine problem! Could you share a screenshot of your query and blurred result so that I can get more information about when this error happens?

stansw commented 7 years ago

I found the root cause. Apparently queries of type oneHop, when run with linksOneHopDoesNotContain query mode, they return work items instead of work item links. I've updated the code and will handle it correctly in the new version that is going to be released today.