Best way to clone issues using scriptrunner listener

dsaveri February 25, 2025

I guess this is a multi-part question.. 

High level - I would like to take predefined list of tasks (with linkages creating a dependency structure) and clone them and the linkages.

The setup is as follows.. I have two issue types.. One issue type is at the Epic level and one is at the story level..the story level ones are the action items that will be cloned from various templates. "dummy" epic level issues are used to hold the different templates of action items.

What Id like it to do... When the work flow of an epic level is changed.. depending on what it was changed to, a specific template is referenced, cloned and put under that specific epic (that was triggered).. new story issue keys are created but the dependency structure from the template remains, just between the new issue keys.

When i use a jira cloud scriptrunner listener, and trigger it off of a issue updated (I get an error...java.lang.StackOverflowError and com.adaptavist.sr.cloud.events.WebhookExecution, Config: null.

From what i read it basically stops it cause if it were to create the issues it would kick the script off again into a loop.. i thought maybe issuetype update would work but i dont think that is what i think / want it to be. 

Thoughts??? 

Id like to stay away from 3rd party software as what Im looking to do seems simple on the surface and also seems like a small part of what some of these add ons actually are for..  

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Luka Hummel - codefortynine
Atlassian Partner
February 26, 2025

Hi there,

While ScriptRunner listeners may offer a way to automate issue cloning in Jira, configuring them can be complex and time-consuming. If you're looking for a more straightforward and efficient solution, consider using our app Deep Clone for Jira.

For your use case you might want to try our Post Function Clone to initiate an Epic/Tree Clone on the Epic transitioning.

By integrating Deep Clone into your workflow, you can simplify the cloning process without the need for complex scripting.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events