Dialog opener button causes a 404 page to appear if it is clicked before the page is fully initialized

ui
jira-cloud
atlassian-connect

#1

Hi Everyone,

I am working on a connect app that adds a button to Issue Navigator and Single Issue view - that button then opens a dialog module. The problem is that if you click “too early” on the button right when the page is visited (I think just before all core JavaScript is initialized on the Jira page), Jira will try to open a non-existing target, so a HTTP 404 page appears.

It is important to note that the 404 error only happens if the user does not wait for the whole page to load and the button to initialize, but it happens way too often and is very confusing for the user:


Excerpt of my atlassian-connect.json is:

{
    ...
    "webItems": [
      {
        "key": "export-button-issue-details",
        "name": {
          "value": "Export"
        },
        "location": "jira.issue.tools",
        "weight": 1,
        "target": {
          "type": "dialogmodule",
          "options": {
            "key": "create-export-dialog-single"
          }
        }
      },
      ...
    ],
    "dialogs": [
      {
        "key": "create-export-dialog-single",
        "url": "/export/create?projectKey={project.key}&issueKey={issue.key}&context=SINGLE_ISSUE_VIEW",
        "options": {
          "height": "100%",
          "width": "100%",
          "chrome": false
        }
      },
      ...
    ],
    ...
  }
}

Has anyone experienced problems like that? Any suggestions would be welcome.

Thank you!
Gabor Nagy