Clone Epic and copy child issues to new cloned Epic using Jira Automation
I have Issue-1 as Epic, and Issue-2 as child issue(story). I want to clone Epic issue and copy child issues of Epic to newly cloned issue.
Eg - Issue-1 ---> issue-2
Output should be Issue-3(newly cloned)---> issue-2
Hi Tushar,
Here are the possible steps to Clone an Epic and Link its Child Issues.
Create a rule with the following steps:
1. Choose the trigger Issue Created
2. Click on the New Action button and select Branch rule / related issues.
Choose For Epic Issue > Related issues > Child issues.
3. Create an action to clone the Epic.
- Add a new action and select Create issue.
- Configure the issue to be created as an Epic.
- You can copy over the fields from the original Epic as needed (like summary, description, etc.).
- After creating the new Epic, save its issue key in a variable (you can name it `{{newEpic}}`) to use later when linking the child stories.
4. Now you need to clone the child issues (stories) from the original Epic.
- Add a new action after cloning the Epic and select Create issue again.
- Configure this to create the new child issues (stories), and ensure it is linked to the newly cloned Epic (use `{{newEpic}}` as the Epic link in the story configuration).
- Copy over the necessary fields (summary, description, etc.) from the child issue.
5. If you want to link the original child issues to the newly cloned Epic (and not clone them), you can:
- Use the Link issues action.
- Set the link type to "Epic link" and link the original story (child issue) to `{{newEpic}}`.
6. Once you’ve set everything up, click on Save and Turn on the rule.
Hello @Tushar
An alternative to Automation (easier and quicker) to clone epics with their child issues is to use our app Elements Copy & Sync.
It allows you to clone and sync a full hierarchy of issues with all their content (summary, description, custom fields, comments, attachments, etc).
You can check the guide here.
The app is for free during 30 days (and it stays free under 10 users).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tushar,
To achieve this with ease, I recommend our app Deep Clone for Jira. Deep Clone allows you to clone Epics with all their child issues (Stories, Tasks) in just a few clicks, ensuring an exact copy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tushar
To clone an Epic and its child issues in Jira using Automation, follow these steps:
1. Create a New Automation Rule:
2. Set the Trigger:
Choose the trigger as Issue Created or Issue Transitioned, depending on when you want to execute the automation. You can also choose manual trigger, if you want the issue to be cloned on a need basis
3. Add a Condition:
To limit this automation to only Epic issues, add a condition:
Select Issue Fields Condition.
Set Issue Type to Epic.
4. Create the Action for Cloning the Epic:
Add a new action Clone Issue.
Configure the clone settings:
Set Project to the same or different project as required.
Set Issue Type to Epic.
Optionally copy additional fields as needed.
5. Create the Branch Rule/Related Issues for the Child Issues:
Add a new Branch Rule/Related Issues.
Select For Epic's stories.
Add an action inside the branch to Create Issue.
Set the following fields for the new issue:
Project as needed.
Issue Type as needed (Story, Task, etc.).
Set the Epic Link to the newly created Epic using the smart value {{createdIssue.key}}.
Map other fields like Summary, Description, etc., as needed using smart values from the original story.
6. Save the Automation:
Save the rule.
Let me know if this helps!
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Pramodh M ,
The cloning of Epic is working as expected. But copying the child issues of Epic to newly cloned Epic is not working, instead your automation is creating new child issues in Cloned Epic.
I need copying of child issues of Epic to the cloned Epic.
Eg. Epic A is having Story X and Story Y as child issues.
Expected in automation as, Clone Epic A to Epic B and copy Story X and Story Y to Epic B
~Tushar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Pramodh M
For this scenario, I believe the rule needs to save the newly created Epic's key in a variable before the branch, and then that variable is used to set the parent field as each issue is created inside of the branch.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.