How to get Jira Issue details for my Velocity template web-panel?

Adam Hraban November 20, 2019

Hello,

I have created a web-panel plugin for issue using Velocity, this panel reads some rest data (provided by the plugin itself) with JavaScript. Now I would like to add some details of the issue (eg. Issue Type, Issue Priority, Issue Number). Based on this issue details the web-panel will display different output.

  1. Is it possible to read the issue details in Velocity itself somehow?
  2. Do I need to create a Java class that will read the issue details first and pass it then to my Velocity template as parameters? If so – how do I invoke/call this class? As in plugin-context.xml there is just this Velocity file as a resource:

<web-panel key="Issue plugin" location="atl.jira.view.issue.right.context">
    <resource name="view" type="velocity" location="/templates/view.vm"/>
</web-panel>

Many thanks for any hints/help

1 answer

1 accepted

0 votes
Answer accepted
Adam Hraban November 20, 2019

Resolved by adding context-provider class to web-panel definition in  atlassian-plugin.xm

Suggest an answer

Log in or Sign up to answer