Page tree

This documentation relates to an older version 5.2 of the Structure for Jira. Visit the current documentation home.

Skip to end of metadata
Go to start of metadata

ScriptRunner is an app by Adaptavist which allows the use of Groovy scripts to automate workflows, update fields and perform other actions in Jira.

It also allows users to expand functionality of other apps using their APIs. There are a number of things you can do with Structure too. In the following pages, you will find sample scripts that can be used as is or customized to create your own tailored scripts.

In order to set up automation or run/change the scripts, a user will need administrator permissions. 

ScriptRunner offers a number of options, which you can access via the ScriptRunner section on the Administration | Add-Ons page. 

  • Script Console - This allows a user to run a specific script once. The script can make some changes in Jira and other apps and/or provide some output in the console.
  • Script Fields - These scripts run for each issue and return a result that is visible on the issue page and is available as a structure column.
  • Script Listeners - This allows you to store a script that will be triggered on a specified event.
  • REST Endpoints - This lets you create custom API endpoints, which allow you to access Jira information from external processes.
  • Built-in Script – This contains a list of scripts that come bundled with ScriptRunner. You can not change the scripts, but you can sometimes pass parameters to them.
  • Script Fragments - These scripts will allow you to interface with the UI for customizations.
  • Escalation Services - This allows a user to define when an issue needs to be modified after a certain time has passed.
  • Script JQL Functions - This allows custom creation of JQL-callable functions, based on scripts. It includes a number of prepackaged functions.

Sample Scripts

One-Time Run Scripts

You can create or change structures by executing a script in the Script Console. You can also set up Script Listeners, so the script is triggered and executed every time some event happens. 

Script Field Scripts

You can also add Script Fields as columns in structures.

All of these samples can be implemented as is or customized to fit your specific business needs.

  • No labels