I am trying to recreate scripts for ScriptRunner (post functions used in Jira Workflows).
The script is throwing the error at "Import com.atlassian.jira.component.ComponentAccessor".
It is giving the error: "Invalid Imports".
I do have the following reference document here: https://community.atlassian.com/t5/Jira-questions/Getting-import-error-in-Script-runner/qaq-p/1218966
I would like to know the way out for the post-functions used in Jira workflows in Server to work in cloud. If recreating the scripts in cloud is not the option what is the workaround?
Hi @Sourav Mallick ,
The TL;DR is: You'll have to put in some work to adapt or rewrite your scripts. Adaptavist have a nice guide here: https://www.scriptrunnerhq.com/inspiration/blog/rewriting-scriptrunner-scripts-for-migration
Although ScriptRunner Cloud still uses Groovy, the actual Jira APIs that can be used are quite different between Server/DC and Cloud. On Cloud, you can only use the REST and GraphQL APIs, while you had virtually all internal APIs at your disposal on Server/DC. Neither is better or worse, just different with different tradeoffs.
Hope that helps,
Oliver
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.