Several limitations are applied to scripts when they run, as detailed below. The limits should be more than sufficient for most scripts and are designed to catch erroneous scripts. 


There is a limit of 240 seconds for script executions. After running for 240 seconds, the logs will be collected, and the code will be terminated. Any logs from the first 240 seconds of execution will be logged on the Script Logs page.

There is a limit of 30 seconds for each call made to the API. We impose these timeouts to prevent scripts/API calls from running for a long time period and impacting the performance of the Jira Cloud infrastructure provided by Atlassian. We cannot change the timeout for each API call.

Data Limit

There is a limit of 10MB on how much data you can send in a REST API request to Jira or Confluence. This is likely only to impact uploading attachments to Jira or Confluence. The REST API call may fail with a 500 or 413 HTTP response.

Method Size

There is a JVM limitation that relates to the size of methods within scripts. This is imposed by Java rather than ScriptRunner or Jira, as documented in the Atlassian KB. A single method can consist of up to 65536 bytes of bytecodes before the JVM limit returns the error shown below:

General error during class generation: Method code too large

Scripts in ScriptRunner Cloud Storage

Our scripts are stored externally from your Jira instance in ScriptRunner Cloud Storage. The scripts are not part of any Jira exports, meaning that they cannot be automatically migrated between Jira Cloud instances. Currently, it is not possible to migrate your scripts back into Jira Cloud’s storage. If you require a larger amount of storage you can create a support request.

Please note that we store Behaviours using the UI Modifications API, so at a maximum, you can create 3000 Behaviours. However, a context (combination of project, issue type and view that the behaviour is executed on) can only be used for 100 behaviours.

Jira back-ups and ScriptRunner data

As scripts are stored in our AWS hosting infrastructure and NOT stored within Jira (with the exception of Workflow Post Functions), then you should be aware that if a Jira backup is performed, you are not backing up any links to the ScriptRunner Cloud data.

Unfortunately, the instance URL is irrelevant. So if you perform a site import or a restore of a backup, even with the same URL, the ScriptRunner Cloud data won't necessarily reappear. In some cases, the opposite is true.

Package imports

You cannot import external libraries as this is not supported. Whilst you can import packages into your scripts in the Script Console, Script Events and Post-Functions, you can only import from the standard Java 11 classes and the following libraries:

  • org.codehaus.groovy:groovy:4.0.6
  • org.codehaus.groovy:groovy-dateutil:4.0.6
  • org.codehaus.groovy:groovy-datetime:4.0.6
  • org.codehaus.groovy:groovy-nio:4.0.6
  • org.codehaus.groovy:groovy-json:4.0.6
  • org.codehaus.groovy:groovy-jsr223:4.0.6
  • org.codehaus.groovy:groovy-templates:4.0.6
  • org.codehaus.groovy:groovy-xml:4.0.6
  • org.codehaus.groovy:groovy-sql:4.0.6
  • com.fasterxml.jackson.core:jackson-core:2.15.2
  • com.fasterxml.jackson.core:jackson-annotations:2.15.2
  • com.fasterxml.jackson.core:jackson-databind:2.15.2
  • io.github.openunirest:unirest-java:2.2.10
  • org.apache.httpcomponents:httpclient:4.5.13
  • org.apache.httpcomponents:httpcore:4.5.13
  • org.apache.httpcomponents:httpasyncclient:4.1.4
  • org.apache.httpcomponents:httpcore-nio:4.4.10
  • org.apache.httpcomponents:httpmime:4.5.13
  • org.slf4j:slf4j-api:1.7.36
  • com.amazonaws:aws-lambda-java-log4j2:1.5.1
  • org.apache.logging.log4j:log4j-api:2.19.0
  • org.apache.logging.log4j:log4j-core:2.19.0
  • org.apache.logging.log4j:log4j-slf4j-impl:2.19.0
  • org.apache.logging.log4j:log4j-iostreams:2.19.0
  • org.apache.logging.log4j:log4j-1.2-api:2.19.0
  • org.immutables:builder:2.8.8
  • io.jsonwebtoken:jjwt:0.9.1
  • org.postgresql:postgresql:42.2.19
  • mysql:mysql-connector-java:8.0.23
  • org.jsoup:jsoup:1.15.3

UniRest Library

ScriptRunner is built to use the UniRest library as shown in the above list for making REST API calls. This allows you to make a REST API callwith BasicAuthentication using a structure similar to the one outlined below. Remember to make sure you are doing this over HTTPS.

def result = get('/rest/project-templates/1.0/createshared/10005') .basicAuth('', 'XXXX') // enter here your username and API token. .asObject(Map) .body
On this page