Forge jira:dashboardGadget – Configure option disabled after adding gadget (Custom UI)

Hello,

We are migrating our Jira dashboard gadget from Connect to Forge (Custom UI).

In our manifest.yml we’ve defined the gadget like this:

jira:dashboardGadget:
  - key: upraise-calendar-gadget
    title: UpRaise - list of calendar events
    description: >
      View your calendar events in a convenient list format, making it easy
      to track employee leaves, holidays, anniversaries and birthdays.
    resource: main
    resolver:
      function: resolver
    thumbnail: {thumbnail_URL}
    edit:
      resource: main

function:
  - key: resolver
    handler: index.handler

resources:
  - key: main
    path: static/upraise/build

Issue:

  • The gadget appears correctly in Jira’s Add gadget list.

  • After adding the gadget, the Configure option in the gadget header is disabled.

  • In our Connect app, the Configure option is enabled immediately after adding.

  • After we manually add configuration (via our own config UI) and then click Done on dashboard edit mode, the gadget shows:

    “This gadget hasn’t been configured yet. To configure this gadget, click the ‘Edit’ button situated at the top of your dashboard.”


Configuration handling:
We’re saving and retrieving config using Jira’s dashboard item properties REST API:

export const URL_GET_CONFIG_DETAILS =
  `${getHostBaseUrl()}/rest/api/2/dashboard/{0}/items/{1}/properties`;

export const URL_SAVE_CONFIG_DETAILS =
  `${getHostBaseUrl()}/rest/api/2/dashboard/{0}/items/{1}/properties/itemkey`;

Called from Forge Custom UI via @forge/bridge

import('@forge/bridge').then(({ requestJira }) => {
  requestJira(apiPath, options)
    .then(async (response) => { /* parse and handle */ })
    .catch((e) => { /* error handling */ });
});

We have the required scopes in manifest.yml

- read:dashboard:jira
- write:dashboard:jira
- write:dashboard.property:jira

Permissions are confirmed correct, and config save/get APIs are working.


Question:
In Forge, if we have defined edit: resource: main for a jira:dashboardGadget, shouldn’t the Configure option be enabled automatically (similar to Connect)?
Is there something we’re missing in order for the Configure button to be active right after adding the gadget?

After using view.close() & view.submit() the problem solved. Thank you.