2

I would like to create a JIRA gadget for a dashboard which displays a graph not currently available. I have looked through thousands of out of date pages from Atlassian. I have downloaded their examples and tried to run them. The most recent example I can find is this: https://bitbucket.org/atlassian_tutorial/jira-days-left-in-version-gadget

When I run this example it looks like this: enter image description here

I am sure that this is not correct. The documents call out that they may be out of date. The skeletons project created with the tools create different xml tags than the examples. The documentation must have been lost at see.

If someone could point me to a working example with the latest version of JIRA, I am confident that I can massage it to do what I need. Here are some observed differences. The documentation gives these tags in 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>

The default tool gives these tags.

<!-- 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>

I have found https://developer.atlassian.com/server/jira/platform/web-resource/ which is riddled with vague conditional version logic.

Phillip Scott Givens
  • 5,256
  • 4
  • 32
  • 54
  • If you are going to vote a question down, please be a good netizen and leave a comment as to why. I suspect that the person who did this has not read the JIRA documentation. – Phillip Scott Givens Jan 14 '18 at 07:53

1 Answers1

2

To the next poor soul who has tried to create Gadgets for JIRA, Don't.

I spent a good eight hours working through the documentation and scouring the internet before I stumbled upon a comment in this thread which told me that Gadgets are gone in lieu of Dashboard Items. https://community.atlassian.com/t5/Answers-Developer-Questions/Missing-dependency-after-update-to-Jira-7/qaq-p/486687

How do you build a Dashboard Item? You could read the documentation here which leaves a lot to be desired in the way of details, references, and tutorials: https://developer.atlassian.com/server/jira/platform/building-a-dashboard-item/

My saving grace is this example. https://bitbucket.org/ghyston/jira-example-dashboard-item/overview

Please RTFM. ghyston has done a great job documenting what you need to do to get this working in the readme.md. Follow the instructions because things won't build without 'typings', for example.

Phillip Scott Givens
  • 5,256
  • 4
  • 32
  • 54