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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,030
Community Members
 
Community Events
184
Community Groups

CloneIssue no longer found after JIRA upgrade

I get this error, not sure why the CloneIssue constructor is no longer found:
2019-11-27 12:16:06,853 ERROR [workflow.AbstractScriptWorkflowFunction]: Script function failed on issue: CRPT-49, actionId: 421, file: com/wumed/jira/scriptrunner/postfunctions/CRIScreenPostFunction.groovy
groovy.lang.GroovyRuntimeException: Could not find matching constructor for: com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CloneIssue()

 

I can't seem to find the API documentation either to see if something changed for "com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CloneIssue"

JIRA version: 8.5.1

Scriptrunner version: 5.6.8.1

1 answer

@Vivian Escalante 

They have changed the way of implementation see the following documentation page on there website, it also has a example on how to fix this issue by using the creatBean function instead of doscript: 

https://scriptrunner.adaptavist.com/latest/jira/releases/breaking-changes.html#_Some_Groovy_Classes_Backwards-incompatible

Hope it helps :)

 

Added the code piece for if they would remove this page:

 

import com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CloneIssue
import com.onresolve.scriptrunner.runner.ScriptRunnerImpl

def inputs = [
'FIELD_TARGET_PROJECT' : 'FOO',
'FIELD_SELECTED_FIELDS': null, //clone all the fields
]
as Map<String, Object>

def executionContext = [
issue:
issue,
]

def cloneIssueBean = ScriptRunnerImpl.scriptRunner.createBean(CloneIssue) cloneIssueBean.execute(inputs, executionContext)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events