User guide

Accessing the add-on

Required permissions

You need to be logged in with JIRA Administrator permissions in order to manage the add-on configuration.

Locating the add-on

The add-on is located in the Add-ons section of your JIRA instance. Click the cog icon in the top right corner of your screen and select add-ons from the dropdown menu:

Next, locate the Custom JS add-on in the left pane of your screen and select the Configuration link.

Or you could simply press g+g on your keyboard and search for Custom JS to navigate straight to the add-on configuration.


On this page:

JS contexts

The Custom JS unlocks the possibility to add custom scripts to your JIRA instance. Where these scripts will be run, is triggered by the context you add them to. A context may be understood as a page or a set of pages in JIRA. Five different contexts are available, represented by tabs in the add-on UI:

ContextDescription
GeneralThe general context includes all JIRA screens, except for the Administration section. So scripts you add to this section will be triggered on every JIRA screen, except for the Applications, Projects, Issues, Add-ons and User Management screens and there sub-screens in the Administration section.
DashboardThe Dashboard context includes all Dashboards that have been configured in your JIRA instance. This includes private and shared dashboards as well as the System Dashboard.
User ProfileThe User Profile context refers to the User Profile pages of your JIRA Users. Scripts you add to this context will apply to these profile pages only.
JIRA Issue ViewThe JIRA Issue View context refers to the view issue issue page in JIRA.
Tempo WorklogThe Tempo Worklog context covers all Tempo Timesheets screens allowing you to log work.

To apply a script to a specific JIRA context, just select the tab for that context and add your script on that tab.

Adding a script

To add a script to a specific context, follow the steps below:

  • Navigate to the Custom JS Configuration page.
  • Select the tab for the context you want to add your script to. In the example below, we use the Tempo Worklog context.
  • Click Edit.
  • Add your script in the editor window. Syntax highlighting makes your script easy to read.
  • When you're done, click the Save button.

Your script will look like this:

The example code changes the displayed text and font color of the username as displayed on Tempo Timesheets screens. When you open this screen, the script is run and you can see the result, like shown on the screenshot below:

Examples

Custom JS for JIRA is a powerful extension to your JIRA instance. The power is in the flexibility offered through scripting. Possibilities are endless, so check our Examples page to get inspired.