The Switch User built-in script allows administrator users to temporarily assume the identity of another user. Switch User has a variety of uses, such as:
Reproducing and troubleshooting problems specific to a user to diagnose permissions issues.
Updating an issue on behalf of another user if they are unavailable.
To switch back to your original user, click the Return to session as link in the Switch User banner.
Use the Configuration Exporter built-in script to export extension configuration information to a descriptor (YAML) file. The YAML file contains information required to configure built-in extension points such as listeners, hooks, macros, and UI fragments, etc.
Using this file within Script Plugins when migrating from one instance to another, allows scripts to be automatically configured, saving time and ensuring consistency across instances.
To create the YAML file, first navigate to Built-in Scripts > Configuration Exporter from ScriptRunner.
Items with configurations available for export are shown in the Export What field. Select the items you wish to generate the YAML for. Multiple items can be exported to one YAML file.
The Note field is used to distinguish one item from another, only items with notes are shown. Ensure the Note field has a value for all configuration items you wish to export.
Click Run to generate the YAML snippet. Copy the snippet and paste it into your
You can manually edit the code yourself to add more items, though it’s generally easier to re-generate the YAML file using the Configuration Exporter script.
List Scheduled Jobs
Use the List Scheduled Jobs built-in script to view details of all scheduled jobs on the current instance.
Results show the Job ID, Interval, Next Run, and Run Mode of each job, listed below the feature under which they run.
To use this script, you need to click Run.
View Server Log Files
Use View Server Log Files to see the last N number of lines of the desired server log.
This built-in script allows users to check log files without the need to connect to and have access to the server.
Clear Groovy Class Loader
Use Clear Groovy Caches to manually clear caches if automated clearing fails. Automation should reload classes whenever a script is modified; however, dependent classes can fail to reload.
There are no fields for this built-in script. You just have to select Run or Preview. After you run this script, expect a delay in screen refresh because classes are recompiled when clearing caches.
If you have a custom class file (ClassA) in your script roots and another Groovy script imports that file, modifications to ClassA may not show up until you modify the script that imports them or clear the Groovy cache with this script.
|Do not run this built-in script in a production instance as you may suffer irretrievable data loss.|
Use Test Runner to run JUnit and Spock tests in a development instance only. Follow these steps to run the built-in script:
Enter the list of packages to scan for tests in Packages.
Enter tests to run in Tests.
Click Run to execute the script or click Preview to view changes before implementing them.
Once you select Run, the Results of the script appear.
Have questions? Visit the Atlassian Community to connect, share, and learn with other Atlassian users and experts, including Adaptavist staff.
Want to learn more? Check out courses on Adaptavist Learn, an online platform to onboard and train new users for Atlassian solutions.