ISSUE_QUICK_ADD_CLICKED event is triggered multiple times

XMLWordPrintable

    • Severity 2 - Major

      Summary

      When adding a quick-add button:

      "jiraIssueContents": [
          {
              "icon": {
                  "width": 0,
                  "height": 0,
                  "url": "/my_icon.svg"
              },
              "target": {
                  "type": "web_panel",
                  "url": "/hello-world"
              },
              "tooltip": {
                  "value": "This is a tooltip. A hello world one"
              },
              "name": {
                  "value": "Anne Issue Content Panel 0"
              },
              "key": "anne-issue-content-panel-0"
          }
      ],
      

      and listening to the ISSUE_QUICK_ADD_CLICKED event:

      AP.events.offAll('ISSUE_QUICK_ADD_CLICKED');
      AP.events.on('ISSUE_QUICK_ADD_CLICKED', function(event) {
          // isNewToIssue is true if this is first time content panel being added to current issue.
          // isNewToIssue is false if content panel is already on issue view, and it is selected.
          console.log(`ISSUE_QUICK_ADD_CLICKED`, event);
      });
      

      The event is triggered multiple times on a single click of the quick-add button (see screenshot). Same goes for when target is a dialog and not a web_panel

      Observation

      • Multiple events are triggered on first click, succeeding ones fire single only
      • Intermittent but easy to reproduce. Just refresh or try adding two jiraIssueContents and you should get at least 6 events

              Assignee:
              Unassigned
              Reporter:
              Anne Calantog
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: