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
Navigate to the script folder to which you wish to add a new .groovy file or folder.
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.
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.
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.
Select the .groovy file you wish to edit from the left-hand Script Root file navigator.
Make any changes necessary to the file in the right-hand script field.
Select the orange Save button when you have finished editing.
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.
Right-click on the file/folder in question.
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.