I'm in the process of migrating my Jira instance from Server to Cloud, and I'm using Scriptrunner with several custom scripts.
Currently, on my Jira Server, I manage and package all my code in the Script Editor panel of Scriptrunner. This is beneficial because I can separate my code logic and reuse class definitions across various scripts, behaviors, and validators using the package definition.
However, I was surprised to find that the Script Editor panel is not available in the Cloud version of the app (unless I missed something but it is in the doc: https://docs.adaptavist.com/sr4jc/current/differences-between-scriptrunner-for-jira-server-and-jira-cloud/feature-parity). This is soooooo surprising and I couldn't understand why ... it was so usefull ...
Could you please advise on how to import and manage my packaged classes in the Jira Cloud instance?
Hi @Nicolas PR
It's not possible to import your code directly from the Server / DC instance to Cloud.
In the Server instance, you can directly access the code and API. However, in the Cloud this is not possible.
You will need to make REST requests to get the details of the fields that you want to update and set the value accordingly.
I suggest reading through the Server to Cloud migration documentation as well as Tips for Re-Writing your scripts for migration for more information.
Thank you and Kind regards,
Ram
Hi @Ram Kumar Aravindakshan _Adaptavist_ Thank you for your response.
That's what I had read, but I was concerned that a part of my logic, which is based on the use of Jira's Java API and my package definition for reusability (using stored scripts and Script Editor), would become largely obsolete.
To summarize:
1. The Java API cannot be used anymore, and scripts should be designed to use the REST API instead (for more information: https://scriptrunner-docs.connect.adaptavist.com/jira/).
2. The capability to define scripts in files no longer exists, only inline scripts are available, which are not reusable by definition
3. It is not possible to save and manage custom scripts snippets from ScriptConsole or Browse page)
4. Custom REST Endpoints no longer exist, so reusable scripts cannot be defined and used as RestEndpoint neither.
(Other: 5. I was using Behaviours with javascript injection in description fields in JSD/JSM's forms, this is no longer possible ?)
Did I understand correctly?
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DC/Server and Cloud are totally different applications, and hence Scriptrunner is too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, thank you to both of you for your valuable responses,
It seems like the journey ahead will be long and tedious...
Kind Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.