You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求适配最新JIRA版本的可用Gadget示例源码

求适配最新JIRA版本的自定义仪表盘Gadget可运行示例

我最近在折腾给JIRA仪表盘做个自定义Gadget,用来展示现有内置图表覆盖不到的内容。结果过程全是坑:翻了一堆Atlassian的老文档,下载了他们的示例项目(找到的最新版是那个"版本剩余天数"的Gadget),跑起来各种异常;用官方工具生成的骨架项目,atlassian-plugin.xml里的标签和旧文档、示例完全对不上,而且文档里的版本条件逻辑写得模模糊糊,根本没法照着做。

遇到的标签差异对比

旧文档里的atlassian-plugin.xml片段:

<resource type="i18n" location="i18n/i18n" name="i18n" />
<rest key="tutorial-gadget-rest-resources" path="/tutorial-gadget" version="1.0">
<description>Provides the REST resource for the project list.</description>

工具自动生成的atlassian-plugin.xml片段:

<!-- add our i18n resource -->
<resource type="i18n" name="i18n" location="myPlugin2"/>
<!-- add our web resources -->
<web-resource key="myPlugin2-resources" name="myPlugin2 Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<resource type="download" name="myPlugin2.css" location="/css/myPlugin2.css"/>
<resource type="download" name="myPlugin2.js" location="/js/myPlugin2.js"/>
<resource type="download" name="images/" location="/images"/>
<context>myPlugin2</context>
</web-resource>
</rest>

我还查了官方的Web Resource相关文档,但里面全是模糊的版本条件逻辑,根本搞不清当前版本该用哪种写法。有没有大佬能给个适配最新JIRA Server/Data Center版本的可运行自定义Gadget示例?能帮我理清现在正确的配置结构和开发流程就太感谢了!

内容的提问来源于stack exchange,提问作者Phillip Scott Givens

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 03:31:40