我想为仪表板创建一个 JIRA 小工具,用于显示当前不可用的图表。我浏览了 Atlassian 的数千个过时页面。我已经下载了他们的示例并尝试运行它们。我能找到的最新示例是:https://bitbucket.org/atlassian_tutorial/jira-days-left-in-version-gadget
我确信这是不正确的。这些文件指出它们可能已经过时了。使用工具创建的骨架项目创建与示例不同的 xml 标签。文档一定是在查看时丢失的。
如果有人可以向我指出最新版本 JIRA 的工作示例,我相信我可以对其进行按摩以完成我需要的操作。 以下是一些观察到的差异。文档在 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>
默认工具提供这些标签。
<!-- 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>
我找到了https://developer.atlassian.com/server/jira/platform/web-resource/
其中充满了模糊的条件版本逻辑。
最佳答案
对于下一个试图为 JIRA 创建小工具的可怜人来说,不要这么做。
我花了整整八个小时的时间来阅读文档并在互联网上进行搜索,然后我偶然发现了该线程中的一条评论,该评论告诉我小工具已经消失,而不是仪表板项目。 https://community.atlassian.com/t5/Answers-Developer-Questions/Missing-dependency-after-update-to-Jira-7/qaq-p/486687
如何构建仪表板项目?您可以阅读此处的文档,其中的详细信息、引用资料和教程还有很多不足之处: https://developer.atlassian.com/server/jira/platform/building-a-dashboard-item/
我的可取之处就是这个例子。 https://bitbucket.org/ghyston/jira-example-dashboard-item/overview
请RTFM。 ghyston 做得很好,在 readme.md 中记录了您需要做什么才能使其正常工作。请遵循说明,因为例如,如果没有“打字”,事情就无法构建。
关于jira - 有可用的 Jira Gadget 源代码示例吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48246228/