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

Issue Collector does not load inside an iFrame

XMLWordPrintable

      Summary

      When embedding an Issue Collector inside an iFrame the issue collector is not loaded upon selecting the trigger.

      Steps to Reproduce

      1. Add a new Issue Collector;
      2. Add the collector to a page:
        collect.html
        <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
        <html>
        	<head>
        		<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
        	</head>
        	<body>
        		<h1>
        			Hello World!
        		</h1>
         		<script type="text/javascript">
        		jQuery.ajax({
        		    url: "http://localhost:6411/s/8f9621f5d837b46d1fc96f0db847f89b-T/en_USzia53w/64026/17/1.4.27/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?locale=en-US&collectorId=d6bc62db",
        		    type: "get",
        		    cache: false,
        		    dataType: "script"
        		});
        		</script>
        	</body>
        </html>
        
      3. Add this page to an iFrame in another page:
        index.html
        <html>
        <head><title>Index</title></head>
        <body>
        <h3>My Page Title</h>
        </br>
        <iframe src="collect.html" name="iframe_a" height=80% width=75%></iframe>
        </body>
        </html>
        
      4. Access index.html and try to load the issue collector.

      Expected Results

      The issue collector would be loaded with no problems.

      Actual Results

      It seems the issue collector keeps loading forever.

      Notes

      • This problem did not happen on JIRA 6.3.15.

      Workaround

      Adding this to the HTML page that has the issue collector should resolve the problem:

      			$(document).ready(function() {
      				checkContainer();
      			});
      
      			function unhide() {
      				$("#atlwdg-container").removeClass("atlwdg-hidden");
      			}
      
      			function checkContainer() {
      				if ($('#atlwdg-loading').is(':visible')) { //if the container is visible on the page
      					unhide(); //Adds a grid to the html
      				} else {
      					setTimeout(checkContainer, 50); //wait 50 ms, then try again
      				}
      			}
      

              Unassigned Unassigned
              mfernandes@atlassian.com Matheus Fernandes (Inactive)
              Votes:
              8 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: