Getting Started

JIRA Extension Points

Introduction

ScriptRunner allows you to customise the UI of Jira by adding buttons or displaying web content on a page.

Web Panels

Web panels can be used to add HTML snippets to parts of a page.

You can use Web Panels to display additional information on the current wiki page, or Jira issue etc.

For more information about web panels see Atlassian’s documentation.

Note

Due to certain limitations, no more than two fragments can be displayed in a single location.

Additional functionality with the Adaptavist Bridge

We provide some functionality, so your web panel can communicate with the Jira instance. If you are using the Separate HTML CSS Javascript source, than this feature is available to you by default. If you are hosting your own site, you have to include a script tag to our bridge.js. Your personal URI for this javascript file can be found on top of the Script Fragments admin site. You can find the bridge by referencing window.AdaptavistBridge. This contains a context object, which provides more information of the current environment. Eg. If the panel is displayed inside an issue, the context will contain the issueKey. You can also make calls to the Jira rest api, with the context.request function. You can find more information about the endpoint, and the usage here.

How to use Script Fragments

Table View

General

  • Navigate to the Script Fragments section in the ScriptRunner menu

  • Click on Add fragment

  • Select the space where you want the fragment to appear

  • Select the location that you want the item to appear in.

  • Select either the Render External or HtmlCssJs options int he Rendering Mode dropdown

    • The Render External option will link a webpage to your web item, displaying it in a pop-up box where the Web Panel is located

    • The HtmlCssJs option will allow you to inject an HTML URL, CSS and JavaScript into your button

  • If you’ve selected the Render External option, add your target URL

  • If you’ve selected the HtmlCssJs option, add your HTML URL, CSS URL and JavaScript URL to the Web Panel

  • Click Save changes

Note

The HTML, CSS and Javascript has to be hosted somewhere that Jira can access. We recommend CodePen for the hosting. It’s also important to note that the hosting must serve up the matching content-type header for each file.

Web Panel display with external resource

External Resource

Web Panel display with specified HtmlCssJs resources

Specified Resources