ScriptRunner for Jira Cloud Logo

Getting Started

JIRA Extension Points

Releases

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 one fragment can be displayed in a single location.

Additional functionality with the Adaptavist Bridge

We provide some functionality so that 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.

You can find the "bridge" by referencing window.AdaptavistBridge and window.AdaptavistBridgeContext. The AdaptavistBridgeContext contains a context property, 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 AdaptavstBridge.request function. You can find more information about the available endpoints, 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 ScriptRunner can access publicly, with correct CORS support. We recommend CodePen for the hosting. It’s also important to note that the hosting must serve up the correct content-type header for each file.

Web Panel display with external resource

External Resource

Web Panel display with specified HtmlCssJs resources

Specified Resources