Developing Dashboard Gadget in a connect app

Hi. I am trying to develop a dashboard gadget for jira cloud using a connect app. I am facing some problems -

  1. I am not able to figure out how to show the configuration form when the gadget is first added in the edit screen of the dashboard.
  2. After spending a LOT of time, I found a rest api to post configuration: /rest/api/3/dashboard/10002/items/10011/properties/config. But this is giving me a 403: unauthorized error even though I am an admin of my site.

Here is my descriptor:

"jiraDashboardItems": [
      {
        "description": {
          "value": "Dashboard item description",

          "authentication": "none"
        },

        "url": "/gadget.html",
        "configurable": true,
        "configure": {
          "url": "/configureGadget.html",
          "height": 500
        },
        "thumbnailUrl": "http://example.com/images/report-example-thumbnail.png",
        "refreshable": false,
        "name": {
          "value": "Dashboard item title"
        },
        "key": "dashboard-item-key"
      }
    ]
1 Like

Hi @GHMahimaanvita,

For this endpoint - you need to be the owner of the dashboard, not just the owner of the site. Can you confirm you are getting this error as the owner of the dashboard?

Cheers
Melissa

Hey @mpaisley , is this “configure” documented? Can’t find this place in the documentation of the module.

In our Code we don’t have only have the “configurable” part and not “configure”.
Instead when we init our react app, it contains something like this:

AP.require(['jira'], (jira) => {
	jira.DashboardItem.onDashboardItemEdit(() => {
		this.renderComponent(......., element);
	});
});