This cheat sheet provides a high-level summary of how certain ScriptRunner for Jira features may translate from Data Center (DC) to Cloud, helping gauge the difficulty of your migration project. You'll also learn the key differences and limitations of Cloud that may be useful when performing migrations.
General FYIs
ScriptRunner DC uses Groovy scripting, but in Cloud, you will need to use TypeScript/JavaScript and Jira expressions for some features.
In many cases, HAPI scripts can be directly copied and pasted from DC to Cloud and significantly simplify the migration process. If you need to write DC scripts pre-migration, it may be beneficial to write them in HAPI.
Jira Cloud Migration Assistant (JCMA) will migrate some ScriptRunner features to Cloud. Migrated scripts will be commented out as they will not automatically work on Cloud. Check which features are supported here, and note that Behaviours is not supported.
Accelerate ScriptRunner migrations
The ScriptRunner Migration Suite helps simplify and speed up every step of your Jira migration journey.
Timeouts are stricter on Cloud (each script execution is capped at 240 seconds). If you have long scripts, you may need to break the business logic down into multiple smaller scripts. Long-running tasks can also be run as Scheduled Jobs. Atlassian returns helpful information when these timeouts occur, such as 'Retry-After' or 'X-RateLimit-Reset' headers that can be used to pause scripts and retry.
Pagination is also enforced on Jira Cloud to ensure API responses are easier to handle, unlike DC, where you can return very large numbers of results at once. DC scripts that were written to return very large results will need to be modified to account for pagination.
You cannot bypass authentication and permissions using scripts, and/or run scripts as any user. Cloud scripts can only be run by the logged-in user or as the ScriptRunner add-on user and will inherit the same permissions as those users.
Script execution is asynchronous, so when a script runs, users might experience page loading before the script has fully executed. This is because tasks such as retrieving, updating, or creating issues; managing projects; and other administrative functions are executed through API calls.
Gauging the difficulty of a migration
What follows is a very general glimpse of how features and scripts may translate from DC to Cloud.
Remember: in-depth analysis of scripts is required for an accurate estimate, as exceptions are to be expected.
Use the Script Registry to export your DC scripts for review and upload them to the Analyse and Assess tool within SMS for an automated assessment of their Cloud-readiness.
Low-effort migration features
These features are generally more straightforward to translate from DC to Cloud due to equivalent functionality across the two platforms. However, please be aware that there will always be exceptions.
Listeners
It's not possible to trigger scripts based on events from third-party apps.
It may be a challenge to migrate Jobs that are used to access a database.
Long-running Jobs (e.g. instance maintenance tasks) may need to be re-worked due to Cloud's maximum script execution time of 240s.
Workflow extensions (Validators, Conditions, and Post-functions)
Conditions and Validators use Jira expressions.
Post-functions can be written with Groovy.
Try the AI-powered Jira expressions generator that can help you convert plain English into Jira expressions. It’s free to use and part of ScriptRunner’s Leap experiments.
Moderate-effort migration features
These features may be a little more difficult to migrate depending on the length and complexity of your scripts.
Script Fields
Script Fields used for custom or Database pickers may be a challenge to migrate.
HTML formatting is not supported on Cloud.
Fields that return single values should be straightforward to migrate.
High-effort migration features
These features are more limited on Cloud or do not have equivalent functionality, so it may be more challenging to translate use cases over.
Behaviours
More limited on Cloud than DC.
Behaviours for Assets is not supported.
Modifying field properties (read-only, hidden, and/or required, description, helpText, manage Options) is limited for some field types and system fields.
Limited by user permissions. For example, a non-admin cannot access and retrieve lists of options for Select List fields, which means option IDs need to be gathered manually. This limitation affects all Jira Cloud endpoints that only allow access to users with admin permissions. Behaviours scripts to be executed by non-admin users should be written with this in mind.
Forge custom development can be used to recreate functionality.
JQL Functions
On Cloud, you cannot currently hardcode JQL queries/functions into your script like on DC*. Instead, they need to be saved as filters in Enhanced Search and called via a REST endpoint. *A new feature update will soon make this possible.
Custom REST Endpoints
Not supported on Cloud.
Depending on the use case, ScriptRunner Connect or custom Forge development may be used to recreate functionality.