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

Multiple issue collector in the same page with custom triggers is not working

    XMLWordPrintable

Details

    Description

      Summary

      When creating multiple issue collectors with custom triggers, the embedded code will not work. The popups are not displayed correctly.

      Steps to Reproduce

      1. Create two Issue Collectors with Custom Triggers.
      2. Get the HTML Embed and dump into a page.
      3. Create two elements to call the triggers.

      Sample code:

      <html>
        <head>
          <script src="http://code.jquery.com/jquery-1.12.0.min.js"></script>
          <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
        </head>
        <body>
          <div>
            <script type="text/javascript" src="http://localhost:8080/jira6313/s/6da8bb61a2d28a898d243929f7443264-T/en_USmigsqs/6344/4/1.4.16/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=73d54dc1"></script>
            <script type="text/javascript">window.ATL_JQ_PAGE_PROPS =  {
              "triggerFunction": function(showCollectorDialog) {
              //Requires that jQuery is available!
              jQuery("#myCustomTrigger").click(function(e) {
                e.preventDefault();
                showCollectorDialog();
              });
              }};
            </script>
      
      
            <script type="text/javascript" src="http://localhost:8080/jira6313/s/6da8bb61a2d28a898d243929f7443264-T/en_USmigsqs/6344/4/1.4.16/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=36b8d94e"></script>
            <script type="text/javascript">window.ATL_JQ_PAGE_PROPS =  {
              "triggerFunction": function(showCollectorDialog) {
              //Requires that jQuery is available!
              jQuery("#myCustomTriggerA").click(function(e) {
                e.preventDefault();
                showCollectorDialog();
              });
              }};
            </script>
      
      
            <a id='myCustomTrigger' href="#">Report Feedback</a>
            <br>
            <a id='myCustomTriggerA' href="#">Report Bug</a>
          </div>
        </body>
      </html>
      

      Expected Results

      You should be able to open the two issue collectors.

      Actual Results

      Only one Issue Collector will open but it will be broken as it's loading content from both.

      Workaround

      Follow the steps of: https://confluence.atlassian.com/display/JIRA063/Advanced+Use+of+the+JIRA+Issue+Collector#AdvancedUseoftheJIRAIssueCollector-Embeddingmultipleissuecollectors
      This might require JavaScript coding skills.

      Attachments

        Activity

          People

            Unassigned Unassigned
            b6401d6b7d0f siva
            Votes:
            18 Vote for this issue
            Watchers:
            19 Start watching this issue

            Dates

              Created:
              Updated: