我们的网络报告工具的一部分,我们将一堆JIRA页面提取到一个页面中。为此,我们将页面提取到iframe中,如下所示:
<div class='embed-container'><iframe src='http://jira.ourcompany.com/secure/RapidBoard.jspa?rapidView=6044&view=planning.nodetail' style='border:0;'></iframe></div>
带
<style>body { margin: 0px; } .embed-container { position: relative; padding-bottom: 100%; height: 0; overflow: hidden; max-width: 100%; min-height: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style>
单独的链接http://jira.ourcompany.com/secure/RapidBoard.jspa?rapidView=6044&view=planning.nodetail
正常工作,我们会得到结果,但在iframe中会返回异常
An error occurred
Please try refreshing the page, or contact your administrator / Atlassian Support if the problem continues.
Details
Exception: Uncaught Error: No jira/ajs/select/single-select
Resource: http://jira.ourcompany.com/s/323e93367fc956e3ac0c0e0c46249982-CDN/en_USahlg6s/71012/22d2be4a45e303262123c6f0c4c063aa/0c798f90b1a61deafa1d5193fc512be9/_/download/contextbatch/js/_super/batch.js?atlassian.aui.raphael.disabled=true&locale=en-US
Line: 6
Column: 1882
Exception: Uncaught TypeError: Cannot read property 'init' of undefined
Resource: http://jira.ourcompany.com/secure/RapidBoard.jspa?rapidView=6044&projectKey=VSNFOUR&view=reporting&chart=releaseBurndown&version=78791
Line: 148
Column: 32
Exception: Uncaught TypeError: Cannot read property 'trigger' of undefined
Resource: http://jira.ourcompany.com/s/323e93367fc956e3ac0c0e0c46249982-CDN/en_USahlg6s/71012/22d2be4a45e303262123c6f0c4c063aa/0c798f90b1a61deafa1d5193fc512be9/_/download/contextbatch/js/_super/batch.js?atlassian.aui.raphael.disabled=true&locale=en-US
Line: 308
Column: 517
Exception: Uncaught Error: undefined missing jira/flag
Resource: http://jira.ourcompany.com/s/323e93367fc956e3ac0c0e0c46249982-CDN/en_USahlg6s/71012/22d2be4a45e303262123c6f0c4c063aa/0c798f90b1a61deafa1d5193fc512be9/_/download/contextbatch/js/_super/batch.js?atlassian.aui.raphael.disabled=true&locale=en-US
Line: 6
Column: 3661
Exception: Uncaught Error: undefined missing jira/flag
Resource: http://jira.ourcompany.com/s/323e93367fc956e3ac0c0e0c46249982-CDN/en_USahlg6s/71012/22d2be4a45e303262123c6f0c4c063aa/0c798f90b1a61deafa1d5193fc512be9/_/download/contextbatch/js/_super/batch.js?atlassian.aui.raphael.disabled=true&locale=en-US
Line: 6
Column: 3661
Exception: Uncaught Error: undefined missing jira/license-banner
Resource: http://jira.ourcompany.com/s/323e93367fc956e3ac0c0e0c46249982-CDN/en_USahlg6s/71012/22d2be4a45e303262123c6f0c4c063aa/0c798f90b1a61deafa1d5193fc512be9/_/download/contextbatch/js/_super/batch.js?atlassian.aui.raphael.disabled=true&locale=en-US
Line: 6
Column: 3661
Environment
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36
Stack trace
Error: No jira/ajs/select/single-select
at callDep (http://jira.ourcompany.com/s/323e93367fc956e3ac0c0e0c46249982-CDN/en_USahlg6s/71012/22d2be4a45e303262123c6f0c4c063aa/0c798f90b1a61deafa1d5193fc512be9/_/download/contextbatch/js/_super/batch.js?atlassian.aui.raphael.disabled=true&locale=en-US:6:1888)
at req (http://jira.ourcompany.com/s/323e93367fc956e3ac0c0e0c46249982-CDN/en_USahlg6s/71012/22d2be4a45e303262123c6f0c4c063aa/0c798f90b1a61deafa1d5193fc512be9/_/download/contextbatch/js/_super/batch.js?atlassian.aui.raphael.disabled=true&locale=en-US:6:4223)
at window.require (http://jira.ourcompany.com/s/323e93367fc956e3ac0c0e0c46249982-CDN/en_USahlg6s/71012/22d2be4a45e303262123c6f0c4c063aa/0c798f90b1a61deafa1d5193fc512be9/_/download/contextbatch/js/_super/batch.js?atlassian.aui.raphael.disabled=true&locale=en-US:9:258)
at http://jira.ourcompany.com/s/0eece49457aceb5c9183460c268f6764-CDN/en_USahlg6s/71012/22d2be4a45e303262123c6f0c4c063aa/284fab080430022efdcdeab955978f67/_/download/contextbatch/js/greenhopper-rapid-non-gadget,atl.general,gh-rapid,jira.global,jira.project.sidebar,jira.general,-_super/batch.js?agile_global_admin_condition=true&is-server-instance=true&jag=true&jaguser=true&locale=en-US&nps-acknowledged=true&nps-not-opted-out=true:100:30
at http://jira.ourcompany.com/s/0eece49457aceb5c9183460c268f6764-CDN/en_USahlg6s/71012/22d2be4a45e303262123c6f0c4c063aa/284fab080430022efdcdeab955978f67/_/download/contextbatch/js/greenhopper-rapid-non-gadget,atl.general,gh-rapid,jira.global,jira.project.sidebar,jira.general,-_super/batch.js?agile_global_admin_condition=true&is-server-instance=true&jag=true&jaguser=true&locale=en-US&nps-acknowledged=true&nps-not-opted-out=true:100:965
有趣的是,当我们使用JQL时:
<div class='embed-container'><iframe src='http://jira.ourcompany.com/issues/?jql=project=VSNR AND type=Bug AND priority=P1 AND "Responsible Organization"="OurTeam" AND status!=DONE AND status!=WITHDRAWN' style='border:0;'></iframe></div>
网页在iframe中正确显示。
之前有没有人使用iframe和JIRA板?
谢谢
答案 0 :(得分:2)
看起来不可能。到目前为止没有给出答案: https://answers.atlassian.com/questions/285729/inserting-a-jira-rapidboard-into-an-external-iframe
https://answers.atlassian.com/questions/8630585/how-do-i-embed-an-agile-board-on-an-external-page
显然有一个市场插件从未尝试过 https://answers.atlassian.com/questions/314198/jira-inside-an-iframe