Limitations

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

Timeouts

Scripts can run for no longer than 120 seconds. After running for 120 seconds the logs will be collected and the code terminated. Any logs from the first 120 seconds of execution will be logged in the Script Logs page.

If the 120 second script run time is not sufficient to meet your needs, you can address this issue by raising a support request.

Package imports

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:2.5.14
  • org.codehaus.groovy:groovy-dateutil:2.5.14
  • org.codehaus.groovy:groovy-datetime:2.5.14
  • org.codehaus.groovy:groovy-nio:2.5.14
  • org.codehaus.groovy:groovy-json:2.5.14
  • org.codehaus.groovy:groovy-jsr223:2.5.14
  • org.codehaus.groovy:groovy-templates:2.5.14
  • org.codehaus.groovy:groovy-xml:2.5.14
  • org.codehaus.groovy:groovy-sql:2.5.14
  • com.fasterxml.jackson.core:jackson-core:2.12.0
  • com.fasterxml.jackson.core:jackson-annotations:2.12.0
  • com.fasterxml.jackson.core:jackson-databind:2.13.2.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.30
  • org.slf4j:slf4j-log4j12:1.7.30
  • org.slf4j:jcl-over-slf4j:1.7.30
  • log4j:log4j:1.2.17
  • 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
  • com.microsoft.sqlserver:mssql-jdbc:9.2.1.jre11
  • org.jsoup:jsoup:1.14.3

Scripts in ScriptRunner Cloud Storage

Currently, the maximum amount of code that can be stored within Jira Cloud across all Script Listeners is 32KB. So, if one Script Listener contains 30KB of code then all your other Script Listeners must only contain 2KB of code between them.

The same maximum storage limit applies to the Escalation Services and Scheduled Jobs features.

Please note that our scripts are stored externally from your Jira instance in ScriptRunner Cloud Storage. Our 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.