使用iframe获取Jira Scrum Board

Fetching Jira Scrum Board using iframe

本文关键字:Scrum Board Jira 获取 iframe 使用      更新时间:2023-09-26

作为我们的web报告工具的一部分,我们正在将一堆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 &quot;Responsible Organization&quot;=&quot;OurTeam&quot; AND status!=DONE AND status!=WITHDRAWN' style='border:0;'></iframe></div>

网页在iframe内正确显示。

以前有人使用过iframe和JIRA板吗?

谢谢

看起来不可能。目前还没有给出答案: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