Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-40105

Application Navigator js error prevents all handlers after that from running

    XMLWordPrintable

Details

    Description

      If there are links configured to show in the app switcher, on every page load, the following lines will fail.

      this.updateDropdown = function (data) {
                  $(function () {
                   that.getDropdown().html(navlinks.templates.appswitcher_old.applications({
                          apps: data,
                          showAdminLink: NL.isUserAdmin,
                          adminLink: ADMIN_EDIT_PATH
                      }));
      
                      that.bindAnalyticsHandlers(that.getDropdown(), data); // this one fails:Uncaught TypeError: undefined is not a function 
                      that.processSuggestionApps(data);
                  });
              };
      

      snippet from com.atlassian.plugins.atlassian-nav-links-plugin:rotp-menu/appswitcher_old.js lines 26-37.

      Now the problem is that because it fails inside a document.ready handler, none of handlers added after this one will run, so any plugin that has a handler registered for document.ready after the app switcher does it job will not work if there are any links configured in the Application Navigator.

      Attachments

        1. agile_error.PNG
          agile_error.PNG
          62 kB
        2. fail-1.0-SNAPSHOT.jar
          203 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              2ab2c0c69c28 FlorinM
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: