Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to recreate scripts for ScriptRunner (post functions used in Jira Workflows) in Cloud?

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?

1 answer

1 vote
Oliver Siebenmarck _Polymetis Apps_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 27, 2023

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

Suggest an answer

Log in or Sign up to answer