Getting Started

JIRA Extension Points

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 60 seconds. After running for 60 seconds the logs at that time will be collected and then the code will be terminated. Any logs from the first 60 seconds of execution will be logged in the Logs page.

Event Rate Limiting

Workflow Functions and Events for the same principle (Issue, Project, User, Board or Version) are restricted to 60 in a minute. When the limit is exceeded events will be dropped for that particular principle, other events are not affected. Any executions that are dropped are logged and can be found in the Logs page.

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 8 SE classes and the following libraries:

  • org.codehaus.groovy:groovy:2.4.7

  • org.codehaus.groovy:groovy-json:2.4.7

  • org.codehaus.groovy:groovy-jsr223:2.4.7

  • org.codehaus.groovy:groovy-templates:2.4.7

  • org.codehaus.groovy:groovy-xml:2.4.7

  • com.fasterxml.jackson.core:jackson-core:2.5.4

  • com.fasterxml.jackson.core:jackson-annotations:2.5.4

  • com.fasterxml.jackson.core:jackson-databind:2.5.4

  • io.github.openunirest:unirest-java:2.2.02

  • org.apache.httpcomponents:httpclient:4.5.2

  • org.apache.httpcomponents:httpcore:4.4.4

  • org.apache.httpcomponents:httpasyncclient:4.1.1

  • org.apache.httpcomponents:httpcore-nio:4.4.4

  • org.apache.httpcomponents:httpmime:4.5.2

  • commons-codec:commons-codec:1.9

  • org.json:json:20160212

  • org.slf4j:slf4j-api:1.7.25

  • org.slf4j:slf4j-log4j12:1.7.25

  • log4j:log4j:1.2.17

  • org.immutables:builder:2.4.6

Script Listener, Escalation Services and Scheduled Job Storage

At the moment, the maximum amount of code that can be stored 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 applies for Escalation Services and Scheduled Jobs.