Automation for Jira - Clone Epic, Story and Sub-tasks

Nicola Greene June 9, 2021

Ideally I am trying to create an automated rule in jira, such that when an epic (with certain labels) transitions to Done, it clones the epic, the stories and their sub-tasks into a new Epic ready to be prioritised in the backlog. 

If this is not possible, then my option 2 is to have an automated rule that where a story (with certain labels) transitions to Done, it clones the story and its sub-tasks into a new story within the same epic.  

3 answers

1 accepted

2 votes
Answer accepted
Alexis Robert
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 2021

Hi @Nicola Greene , 


this is actually a little complicated to do, but I found a way using 2 rules and labels to trigger copies.

First, you'll need to setup a rule that will clone the Epic, and "tag" the issue in this Epic with a temporary label (this way we now what issues to clone in the second step). We will also store the new Epic issue key in a temporary link for those stories.

It looks like this (first screenshot has the details of the Clone action, second one has the details for the Edit Issue action) : 


Screenshot 2021-06-09 at 14.11.47.png

Screenshot 2021-06-09 at 14.12.04.png


Then, the second rule will identify the Stories that we need to clone (and also clone their subtasks). Again the screenshots will show the details for each action :

Screenshot 2021-06-09 at 14.14.14.png

Screenshot 2021-06-09 at 14.14.27.png


Screenshot 2021-06-09 at 14.14.47.png


Let me know if this helps, 



Nicola Greene June 9, 2021

Fantastic.  That works, thanks for your help.

Like Matthias likes this
Nicola Greene July 22, 2021

I'm getting a few errors on this, it seems to be the epic link part.  What is typed in the Epic Link box above (I can't see the full text in the picture)?


Like # people like this
Ye Fung Tchen September 29, 2021

Did you solve your problem?

Like Matthias likes this
Matthias August 15, 2023

Thanks for your instructions! With some changes it works for me!


  1. In the second rule, where the Sub-tasks are cloned I got this error: "Error creating issue Issue type is a sub-task but parent issue key or id not specified. (issuetype)"
    • This helps: change "createdIssue.first.key" to "createdIssue.key":Unbenannt.PNG
  2. Is the same what @Nicola Greenewrote (@Ye Fung Tchen).  In the second rule, where the Story is cloned: "{{issue.issuelinks.last.inwardIssue.key}}" does not work!
    • This works: {{issue.issuelinks.last.outwardIssue.key}}": Unbenannt.PNG
0 votes
Matthias August 16, 2023

I used the instructions from @Alexis Robert thanks for that!

This ist the best automation solution to copy an Epic with its Stories and subs without the  "create variable" function and without plugins.

I had some problems, wich I solved, so here is my solution:


First rule: 







Second rule:

In the Rule details you have to allow this:

  • Allow rule trigger
    • Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.


You can only existing labels here, so you have to create it before in an issue. 







For copy/past:     {{issue.issuelinks.last.outwardIssue.key}}





For copy/past: 


    "fields": {

        "parent": {

               "key": "{{createdIssue.key}}"





Thats it!

0 votes
Diego Quesada July 23, 2021



I have created the two rules, but only one is executed. Do you know, what is the root cause?

Nacho García-Robledo January 27, 2023

Same for me, first automatism works but the second is not triggered even the label has changed.

If I do it manually it kicks in, but it does not make sense for this case.

Matthias August 15, 2023

You have to enable "Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule." in the Rule details of the second rule!

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events