0

I’m currently working on a custom widget that create a visual interpretation of work items within a project in ADO.

We built the custom widget with finalize code in a personal test ADO account. Now, we moved to the company’s ADO account and deploy our code in their org, the publishing and installation went well. But upon adding the custom widget on the dashboard, it only displays the size support option, any other input configuration setting is blank.

We already checked that it uploaded the html and js for the configuration setting in the publisher. We have no errors and warning on the browser console as well, but it still not working.

enter image description here

"contributions": [
        {
            "id": "test_widget_v2",
            "type": "ms.vss-dashboards-web.widget",
            "targets": [
                "ms.vss-dashboards-web.widget-catalog",
                ".test_widget_v2. Configuration"
            ],
            "properties": {
                "name": "Our Custom Widget",
                "description": "Our Custom Widget",
                "previewImageUrl": "img/logo.png",
                "uri": "disp_universal_widget.html",
                "supportedSizes": [...] }
        },
        {
            "id": "test_widget_v2. Configuration",
            "type": "ms.vss-dashboards-web.widget-configuration",
            "targets": [
                "ms.vss-dashboards-web.widget-configuration"
            ],
            "properties": {
                "name": "Our Custom Widget Configuration",
                "description": "Our Custom Widget configuration",
                "uri": "conf_universal_widget.html"
            }
        }

Seems like the widget does not render the html under the uri of contribution id “test_widget_v2. Configuration”.

Had also double checked the register and init in our js and it matches what we have in the vss-extension.json.

Content of configuration js (omitted parts that is not necessary for this question) :

function ProcessConfiguration(WidgetHelpers, TFS_Wit_WebApi) {
    let available_queries;
    return (
        
                    schart_title.val(global_chart_title),
            
        {
            load: function (widgetSettings, widgetConfigurationContext) {
                return ComposeRefreshConfiguration(WidgetHelpers, widgetSettings, widgetConfigurationContext);
            },
            onSave: function () {
                swidget_content.empty();
                let customSettings = {
                    data: JSON.stringify({
                        .....
                    }),
                };
                return WidgetHelpers.WidgetConfigurationSave.Valid(customSettings);
            },
        }
    );
}
function VSSFunction(WidgetHelpers, TFS_Wit_WebApi) {
    VSS.register("test_widget_v2.Configuration", ProcessConfiguration(WidgetHelpers, TFS_Wit_WebApi)), VSS.notifyLoadSucceeded(), (tww = TFS_Wit_WebApi);
}
VSS.require(["TFS/Dashboards/WidgetHelpers", "TFS/WorkItemTracking/RestClient"], function (WidgetHelpers, TFS_Wit_WebApi) {
    WidgetHelpers.IncludeWidgetConfigurationStyles(), VSSFunction(WidgetHelpers, TFS_Wit_WebApi);
});

Any ideas what we are missing here? The code works perfectly fine in a personal test ADO org though.

Already tried adding other scopes but still did not work. Tried to just display a single text box, it still didn't work. This is how it looks like in the personal test org: enter image description here

aienma
  • 51
  • 1
  • 5

0 Answers0