Automation to clone an Epic with child issues and their subtasks
Asked by Bahia Mezraoui:

Hello JIRA community!

I have a question regarding the cloning of an Epic when it contains child issues (which also have sub-tasks). I'm currently trying to create a rule for it but can only succeed at the first layer, meaning the cloning of the Epic itself.

Here are the 2 attempts I've made so far:

![Automation for Epic cloning.png](/t5/image/serverpage/image-id/270670iA8B1E9523CD3CCC9/image-size/large?v=v2&px=999 "Automation for Epic cloning.png")

![Automation for Epic cloning2.png](/t5/image/serverpage/image-id/270673iE8C96C866EFE61B6/image-size/large?v=v2&px=999 "Automation for Epic cloning2.png")  
For this second rule, I've indicated first level of cloning as Epic then Task then Sub-task that is why I've added the action 3 times.  

I think I'm missing a step (or a few), any guidance would be much appreciated :)

Thank you!


Answers:
author: Luka Hummel - codefortynine
body: Hi [@Bahia Mezraoui](/t5/user/viewprofilepage/user-id/5275196) and welcome to the community!

While you can automate this, the set-up is quite tedious and the automation rule can break quickly if there are any changes. If you are willing to use a third-party app, our [Deep Clone for Jira](https://marketplace.atlassian.com/apps/1218652/deep-clone-for-jira?hosting=cloud&tab=overview&source=community337) can quickly clone whole issue hierarchies (Initiatives ? Epics ? Tasks/Stories ? Subtasks) with its [Epic/Tree Clone feature](https://c49.link/deep-clone-for-jira/docs/epic-clone).

comments: author: Bahia Mezraoui
body: Hi [@Luka Hummel - codefortynine](/t5/user/viewprofilepage/user-id/5127666) , thank you for answer I will look into this app :)


author: Bahia Mezraoui
body: Hi again [@Luka Hummel - codefortynine](/t5/user/viewprofilepage/user-id/5127666) just out of curiosity, I know you mention that setting up the automation would be quite tedious but can you share an overview of the steps if you have an idea? Many thanks!


author: Luka Hummel - codefortynine
body: Hi [@Bahia Mezraoui](/t5/user/viewprofilepage/user-id/5275196)

I will try to give a basic overview of the steps. These are of course more complicated if you need additional field values copied or need to create more issue links.

1. Clone Epic
2. **FOR EACH** Most recently newly created issue (Epic): Create issues and add parent field with **Advanced fields** under **More options** . *{* *"fields": {"parent": { "key": "{{issue.key}}" }}}*

3. **FOR EACH** All created issues: Create Subtasks


author: Thibaut Subra _Elements_
body: Hello [@Bahia Mezraoui](/t5/user/viewprofilepage/user-id/5275196)

Welcome to the Atlassian Community!

I see that you find yourself needing to copy Epics along with their entire issue tree, know that we developed an app called [Copy \& Sync](https://marketplace.atlassian.com/apps/1211111/elements-copy-sync-clone-jira-issues?tab=overview&hosting=cloud&utm_source=community&utm_medium=forum&utm_campaign=question-2428160) and it's just what you need!

We've prepared a helpful "How-to" guide that [walks you through the process](https://doc.elements-apps.com/copy-and-sync-jira-cloud/how-to/clone-an-epic-with-all-its-issues-at-once?utm_source=community&utm_medium=forum&utm_campaign=question-2428160) step-by-step.

Moreover, as you're using Automation, know that you can trigger a recipe directly through Automation using our API with just one simple rule.

If you have any questions or need assistance, feel free to reach out to me anytime.

I'm here to help!

comments: author: Bahia Mezraoui
body: Hello [@Thibaut Subra _Elements_](/t5/user/viewprofilepage/user-id/5183563) thank you for sharing, I will check it out :)


author: Dexter de Vera
body: Hi [@Bahia Mezraoui](/t5/user/viewprofilepage/user-id/5275196) ,

Check this other post it maybe useful

<https://community.atlassian.com/t5/Jira-Software-questions/How-to-clone-the-whole-Epic-and-child-issues-included-in-the/qaq-p/187196>

comments: author: Bahia Mezraoui
body: Hi [@Dexter de Vera](/t5/user/viewprofilepage/user-id/4657717) , I did see this question but it only give part of the answer to mine. Thanks for sharing!


Tags: cloud