Script Variables
Script Variables allow you to specify variables that can be injected into your scripts.
Naming convention
Variable names must follow these rules:
- The name must start with a letter
- Only capital letters are allowed
- Only digits and the underscore character (_) are allowed.
Limitations
Length limits for variables include:
-
Name is 32 characters max
-
Value is 3000 characters max.
Note that clicking the show password icon for script variables containing 50 or more characters opens a pop-up window for easy viewing.
Create Script Variables
- Navigate to ScriptRunner and select Script Variables.

- If you've never created a Script Variable before, the bottom of the page will be titled Create Script Variable, and the fields to do so will be available.
- If you've created Script Variables before, they'll be listed on the page. Click + Create Script Variable to make a new one.
- Enter a Script Variable name.
- Enter the Script Variable value.
- Select Save.
Edit or delete a Script Variable
- Navigate to .
- Find your desired Script Variable from the list on the page.
- Select the Actions button correlated to the desired variable.

- Select Edit or Delete.
Selecting Edit allows you to change the Name or Value of the Script Variable. Click Save to lock in your changes.
Selecting Delete brings up a confirmation window. Click OK to confirm.
Examples
To define a script variable with the name
MY_FIRST_SHARED_VARwith the valuetestValue, run the following code:logger.info("My variable has a value: "+ MY_FIRST_SHARED_VAR)You should see the log with the following content:
INFO - My variable has a value: testValueTo define a variable with the name NO_RETRIES with a value of '5', run the following code:
NO_RETRIES + 10The result will be 510 (string concatenation), rather than 15.