Script Editor

Manage your .groovy script files and folders using the ScriptRunner Script Editor. Reuse and share scripts across an instance without the need for FTP services or server administrators. With the Script Editor, you can create, edit, move, save, rename, and delete .groovy script files and folders in root folders from the ScriptRunner front-end.

For example, a script in your Script Roots folder needs updating to include a new condition. Before, you would need to contact the server administrator to update the script. Depending on backlog, this update could take weeks.

With Script Editor, you can add the condition into the .groovy file yourself, saving time, and removing the need for a third party.

Script Editor only supports the creation, editing, moving, saving, renaming, and deletion of .groovy script files and folders.

To access Script Editor, navigate to ScriptRunner, and select Script Editor from the left-hand menu (or ScriptRunner tab).

Create Files and Folders

  1. Navigate to the script folder to which you wish to add a new .groovy file or folder.

  2. Click the Create New File or Create New Folder icon in the Script Editor heading, or right-click on the folder in which you want to add the new file/folder and select Create File or Create Folder.

    You can also right-click on a file within a folder to create a new file/folder in the same location as the selected file.

    An example instance, with the Create New File and Create Folder options highlighted.

  3. Enter a file/folder name in the Add New Groovy File/Add New Groovy Folder window.

    If you have a folder selected, the new file/folder is created within the selected folder. Alternatively you can specify the file path in the folder name field. For example, ../../newfolder.

  4. Click Add. A new .groovy file or folder is added.

    Created your file/folder in the wrong place? Drag and drop the file to the required location in the left-hand Script Root navigation.

    An example folder, moved in the left sidebar using drag and drop.

Edit Files

  1. Select the .groovy file you wish to edit from the left-hand Script Root file navigator.

  2. Make any changes necessary to the file in the right-hand script field.

  3. Select the orange Save button when you have finished editing.

    An example instance, with the Delete and Save buttons highlighted.

    Changes are not saved automatically. When there are unsaved changes to your script, an orange Save button is present. When all changes are saved, a green Saved button replaces the Save button. To delete a .groovy file, click the red Delete button.

Rename and Delete

The Script Editor also allows you to rename and delete .groovy files and folders.

  1. Right-click on the file/folder in question.

  2. From the drop-down, choose to either delete or rename the file/folder.

When a folder is deleted all files within it are also deleted.

On this page