Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Getting 'statusType' of undefined when using RestClient.getClient().getQueries() #143

Open
captaintightpants opened this issue Jun 10, 2019 · 4 comments

Comments

@captaintightpants
Copy link

The widget configuration section was working fine until we upgraded our Azure DevOps version. Now whenever you select the config section and it hits the code "RestClient.getClient().getQueries(x,x,x)" it throws a console error of
image

I was able to track it down to this "t.load(i,r).then(function(t){t.statusType!==h.WidgetStatusType.Success&&n.passErrorToHost(f.ConfigHostAdapter_LoadFailure,"VS403685",t.state);n.props.parentProps.onConfigLoaded(l.interpretStatus(t))}"

Any ideas on how to fix?

@captaintightpants
Copy link
Author

bump

@dan-miller
Copy link

I am encountering this as well for a custom dashboard widget that was working fine until all of the sudden it was not. The configuration section does not load at all, so the widget is essentially useless because you can not put it on another dashboard.

We are running Azure DevOps Services, and from what I've seen I have to assume some sort of system update has broken this functionality.

I can't use the the newer azure-devops-extension-sdk, because Dashboard Widgets aren't supported per microsoft/azure-devops-extension-sdk#17

Please either fix this issue in this package, or advise on a timeline for supporting Dashboard Widgets in the azure-devops-extension-sdk.

@Fritzoid
Copy link

Fritzoid commented Aug 13, 2020

So basically, making dashboard widgets is broken both in the old and the new SDK? This is really strange. I've been trying this as well for some time now and keep hitting roadblocks. Looking at the 2 SDK repos, it seems weird that none of them have had any activity since mid last year. Also the docs for the new API is laking at best. Looks like the whole thing has been 'pulled the plug on'. It smells like MS are about to ditch dashboard widgets? Are both repos just dead and MS is making a brand new thing we dont know about? Would be nice with some kind of official statement from MS about the status of extensions in azure devops.

@dan-miller
Copy link

Yeah MSFT really doesn't seem to give a crap about this.

For the record, I was able to fix my widget config by making sure I returned the Promise from Get Queries:

VSS.require(['TFS/Dashboards/WidgetHelpers', 'TFS/WorkItemTracking/RestClient'], (WidgetHelpers, RestClient) => {
    WidgetHelpers.IncludeWidgetConfigurationStyles();

    VSS.register('OlaWidget.Configuration', () => {
    return {
            load: (widgetSettings, widgetConfigurationContext) => {

                // Retrieve the project name from the web context and use the REST Client
                // to retrieve the queries or folders at the project root.
                const projectName = VSS.getWebContext().project.name;
                return RestClient.getClient().getQueries(projectName, 'Minimal', 1).then(result => {

That last return is crucial, apparently.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants