Getting the Default Velocity Context in JIRA

Hi, I’ve been developing plugins for my company for some time and I’ve recently found a need for a JIRA plugin. I’m wondering how to get the default velocity context.

In the past I’ve used the $webResourceManager from the default velocity context to load javascript routines needed by that view:

<html>
  <head>
    $webResourceManager.requireResource("com.keysight.jira-support:jira-support-admin-resources")
    $webResourceManager.requireResource("com.keysight.jira-support:jira-support-user-list-resources")
    <title>$i18n.getText("com.keysight.jira-support.active-users-list-ajax.title")</title>
    <meta name="decorator" content="atl.admin">
  </head>
  <body>
<h1>Active Users List</h1>
<div id="keysight-users-list-progress-container"></div>
<div id="keysight-users-list-container"></div>
  </body>
</html>

In Confluence, I could use the VelocityHelperService to get the default context; however, it appears to be a Confluence class rather than a general purpose one. So how does one get the default velocity context in JIRA?

Thanks in advance for your help.

2 Likes

OK, dumb mistake. I mistakenly created my *.js files in the css folder so they were not being picked up.

I ended up reviewing the internationalization tutorial at https://developer.atlassian.com/jiradev/jira-platform/guides/other/tutorial-internationalising-your-plugin and confirmed that I was doing things correctly - so the problem had to be something else.

2 Likes