Uploaded image for project: 'Atlassian Ecosystem'
  1. Atlassian Ecosystem
  2. ECO-6

JavaScript API doesn't work if Jira runs in iframe itself

    • Minor
    • 3

      Created from https://ecosystem.atlassian.net/browse/ACJIRA-2613

      Issue Summary

      Our customers want to embed our Jira app’s UI into Confluence pages. To do so, they add an iframe using Confluence’s built-in iframe macro, pointing to the respective Jira URL (e.g. https://foo.atlassian.net/projects/FOO?selectedItem=com.atlassian.plugins.atlassian-connect-plugin:app.jxl).

      In this setup, the Connect JavaScript API - while being loaded seemingly successfully - doesn’t work; the various callbacks, like window.AP.getCurrentUser, simply never resolve.

       

      To verify, call

      window.AP.getCurrentUser((x) => console.log(x));

       

      from the Connect iframe's console. It works if Jira runs in its own browser window, but doesn’t resolve if Jira runs within the iframe.

      There's suspicion that Connect gets confused about to the two nested iframes: First, Jira in Confluence, and then our app in Jira.

      Steps to Reproduce

      1. Confluence’s built-in iframe macro, pointing to the respective Jira URL (e.g. https://foo.atlassian.net/projects/FOO?selectedItem=com.atlassian.plugins.atlassian-connect-plugin:app.jxl).
      2. Call from the Connect iframe's console:
        window.AP.getCurrentUser((x) => console.log(x));

      Expected Results

      It resolves within Jira iframe.

      Actual Results

      It doesn’t resolve if Jira runs within the iframe. 

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

       

      Additionally it blocks important use cases for customers.

            [ECO-6] JavaScript API doesn't work if Jira runs in iframe itself

            Hi Joe. This indeed seems fixed now. Please convey our and our customers' thanks to the team involved. Great stuff. 👍

            To JXL for Jira customers who might be watching this: We are now working on a dedicated embed view of sheets, so if you put them on a Confluence page using the iframe macro you can focus on your sheet data instead of navigation UI. Feel free to watch our app to receive a note as soon as this gets released.

            Daniel Franz - JXL added a comment - Hi Joe. This indeed seems fixed now. Please convey our and our customers' thanks to the team involved. Great stuff. 👍 To JXL for Jira customers who might be watching this: We are now working on a dedicated embed view of sheets, so if you put them on a Confluence page using the iframe macro you can focus on your sheet data instead of navigation UI. Feel free to watch our app to receive a note as soon as this gets released.

            Joe Clark added a comment -

            Hey 21e8e5fc380a & 74700d9b524c - please let me know if this fix has been helpful in addressing this key source of customer frustration you described! 

             

            Joe Clark added a comment - Hey 21e8e5fc380a & 74700d9b524c - please let me know if this fix has been helpful in addressing this key source of customer frustration you described!   
            Sam Leatherdale made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Gathering Impact [ 12072 ] New: Closed [ 6 ]

            Hi 

            Thank you for your patience while we investigated and fixed this issue.

            We deployed an update in January resolving this issue. This should resolve embedding Jira in any parent application (Confluence, Bitbucket, etc).

            Sam Leatherdale added a comment - Hi  Thank you for your patience while we investigated and fixed this issue. We deployed an update in January resolving this issue. This should resolve embedding Jira in any parent application (Confluence, Bitbucket, etc).
            Ekin Bukulmez made changes -
            Remote Link Original: This issue links to "ECOHELP-26923 (Ecosystem Jira)" [ 826806 ] New: This issue links to "ECOHELP-26923 (Ecosystem JIRA)" [ 826806 ]
            Ekin Bukulmez made changes -
            Link New: This issue is duplicated by ECO-69 [ ECO-69 ]
            Damian Kleszcz made changes -
            Remote Link New: This issue links to "ECOHELP-26923 (Ecosystem Jira)" [ 826806 ]
            Damian Kleszcz made changes -
            Labels Original: Javascript connect-add-on iframe New: Javascript connect-add-on ecohelp iframe
            Sean Bourke made changes -
            Component/s Original: Forge - External API Authentication [ 72134 ]
            Component/s New: Connect - Frameworks [ 72154 ]

            The JXL app gives me exactly what I need.  But, I cannot believe that in order to display the results on my Confluence Dashboard that I have to export the JXL data into MS Excel or Google Sheets.  This also means that data on my Confluence page is no longer live. 

            LeRoi Mines added a comment - The JXL app gives me exactly what I need.  But, I cannot believe that in order to display the results on my Confluence Dashboard that I have to export the JXL data into MS Excel or Google Sheets.  This also means that data on my Confluence page is no longer live. 

              a927362f27e1 Varun Bhargava (Inactive)
              ed2f9d56d345 Szymon Rękawek
              Affected customers:
              24 This affects my team
              Watchers:
              21 Start watching this issue

                Created:
                Updated:
                Resolved: