Clone Epic, Stories and Subtasks tree with Jira Automation

50 comments

Yee Ming Chew October 9, 2023

Hi @Jorge H , thank you for the solution. I am currently using Jira Cloud. I tried the automation to clone epic solution you have provided but it is not working. I have gone through multiple times to ensure I am following the solution correctly but only the Epic is cloned but not the child tasks.  Can you please review and let me know if you spot anything incorrect? 

 

Clone Epic 1.PNGClone Epic 2.PNGClone Epic 3.PNGClone Epic 4.PNG

Drew Bradford October 26, 2023

Thanks for this! This is a wonderful tutorial and very helpful.

Alex Müller
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 21, 2023

Dear all,
I have managed to copy all levels from Theme/Initiative (we have switched their levels in our environment) down to Subtask level.

How did I do it?
Basically, it's almost the same as explained in original post by Jorge but I have started with a manual rule  on top level (Theme/Initiative) instead on Epics level. The other 3 rules each handle just their own level:
2023-11-21 12_32_32-Clipboard.png


Rules 2 to 4 do start automatically when corresponding issues are created containing the "key:" string in summary and they create/clone the issues for next lower level while setting the correct parent / epic link.

So basically, it is possible to "deep clone" without installing an additional app / extension.


Best regards
Alex

Harry Ipsarides
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 12, 2024

This was UNBELIEVABLY HELPFUL!  Thank you soo much Jorge!

Ellen Daleng April 15, 2024

Works like a charm!  Much appreciated! 

Tina Rusnak May 22, 2024

Hi everyone! I am trying to use my amazing deep clone automation rules to deep clone to another project; it is allowing me to pick a new project to clone to; the automation is allowed to both projects but it is not working; it is still deep cloning only to the original project - any ideas or does this just not work? Thank you @Jorge H  if any ideas! I have matched workflows, etc...UPDATE: I can actually see the deep clone in the new project Issue list BUT I cannot view it on the board; I've checked all the filters, permissions, etc..it is weird. Also a note; the clone issue is also showing in the old project with the new project id.....

Coach Kevin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 30, 2024

I have this automation working but the only thing I can't figure out is why the stories or tasks under the epic do NOT appear in the same order (rank) after I run the automation. Any thoughts? Thanks

 

Like Genae likes this
Jorge H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 30, 2024

Hi, @Coach Kevin; thanks for trying this workaround. 

By design, the branch executions for Jira Automation rules are done in parallel:

Because of this, it's not possible to guarantee that the cloned issues will be in the same order as the original ones.

There is a feature request to support sequential executions as well:

Feel free to add yourself as a watcher of this feature request to receive updates on its progress as they become available. I also suggest checking how Atlassian implements New Features.

 

 

 

Mir Hossein Farshi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 24, 2024

Thanks for writing this Automation Rule,
I implement the first part (We have no Sub-Tasks) it clone new Epic,It clone new Stories BUT separat, and the new Stories are not under the new Cloned Epic, Do you have any Idea, how can I solve it?
Thank you in advance!

Like Katie Miller likes this
Bastian Becker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 24, 2024

First of all: @Jorge Hthank you so much for this solution!!

It works fine for me, with one exception. Attachments and linked issues are not copied even though I listed them in the clone action. Does anyone have suggestions on how to solve this issue?

screenshot.PNG

Thanks!
Bastian

Like Jens-Olav Høl likes this
Jo-Lee Bertrand
Contributor
July 26, 2024

Epic link is soon to be deprecated. How would this be changed to accommodate? 

Jorge H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 26, 2024

Hi @Jo-Lee Bertrand

Thanks for your comment. Going forward you can use the Parent field. 

I've updated the main post to show this information.

BR,

Jorge Herrera

Like Jo-Lee Bertrand likes this
Jo-Lee Bertrand
Contributor
July 26, 2024

Thank you! My next thing is to sort out how to clone from the initiative level down. I essentially replaced issue equals EPIC with issue equals INITIATIVE. The initiative and epic copy fine. The task ends up being created as a sub-task, and no sub-tasks are copied. I can't quite figure out why (the sub-task rule is not triggered).

Jo-Lee Bertrand
Contributor
August 2, 2024

Wondering if anyone has a sample rule they would be willing to post to clone initiatives as well as epics and tasks underneath? My attempt was not successful. 

Jens-Olav Høl
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 14, 2024

Hi @Jorge H  and thank you for the useful guide; works perfectly! I do however struggle to clone issue links (blocked by/blocks), an important setup in the template epic i clone with this automation. Any hints on how I can manage also cloning within-epic relations between tasks and subtasks limitied to the blocks/blocked by relation?

PS! For the sorting issue adressed by @Coach Kevin above, I simply added a number sequence in the parent/template epic tasks, and set a filter on my project bord to filter issues alphabetically, thus retaining the order of the original epic. Works for me since I use this to clone n versions of a template epic.. 

Derick August 27, 2024

@Jorge H  In my case, tasks are being cloned but I can't link them to a parent, they are left loose in the project. I can't put in the Epic link as EpicKey because this is not an intelligent field, the same thing in the parent field. Both fields ask to select predefined values and do not accept a JQL. What would be the alternative in this situation?image.png

Jorge H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 29, 2024

Hi @Derick

You can manually write the smart value in the field and click on it to use it:

Screenshot 2024-08-29 at 4.56.45 p.m..png

I hope this has helped solve your questions.

BR,

Jorge

 

Sandra Perez
Contributor
November 13, 2024

Hola @Jorge H , quiero realizar esto en mi jira pero no tengo la opcion de Clone epic a la hora de crear una regla, es posible hacerlo de otra manera? A continuación te muestro los desencadenadores que tengo:
Automatizacion.PNG

Jorge H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 13, 2024

Hola @Sandra Perez

El desencadenador tiene que ser manual como se muestra en la segunda imagen del post original.

El desencadenador manual sirve para llamar la ejecución de la regla dentro de alguna incidencia y tomar esa incidencia como referencia para todos los smart values usados dentro de la regla.

Si necesitas más ayuda para entender las acciones incluidas en la regla, por favor siéntete libre de abrir un caso de soporte en el siguiente enlace:

Saludos,

Jorge Herrera

Katie Miller November 19, 2024

Hello! I'm struggling building Jira to work for our marketing team like Asana did. I've followed the directions and am getting two errors. 



Screenshot 2024-11-19 at 9.37.41 AM.pngScreenshot 2024-11-19 at 9.38.30 AM.png

Katie Miller November 19, 2024

I'm noticing that the child issues did clone but they did not go under the right epic. They went under the master epic, instead of the epic that I just built. 

The master epic is Me2-11 and I wanted them to go under Me2-295

Screenshot 2024-11-19 at 9.46.54 AM.pngScreenshot 2024-11-19 at 9.47.47 AM.png

Katie Miller November 19, 2024

Mir Hossein Farshi I'm experiencing the same problem with the child issues getting cloned under the wrong epic, did you find a solution? 

Derick November 29, 2024

@Katie Miller  Hey, Yes i did it. https://community.atlassian.com/t5/Jira-questions/Re-I-need-to-clone-the-subtasks-and-tasks-from-a-history/qaq-p/2802035/comment-id/1048669#M1048669.

The only problem is that the sequence gets messy, but for that I developed another type of automation that consists of cloning using Jira's native function and then just using an automation to remove the name "clone". If this first option does not works, get back to me and I will send you the second option.

Jorge
Contributor
December 3, 2024

Hi @Jorge H 

I successfully triggered rule #1, but I'm having issues with rule#2 for subtasks, 

The part I'm not clear on is on the "Summary contain" condition, does this look correct?

Thanks.

summary conatins.png

andy.johnston
Contributor
December 11, 2024

Found this automation, and it's great @Jorge H  - but one of the issues I get is that the issues don't create if the user assigned to them is an inactive user!?  (I think this is being caused by the Clone function, but I can't figure out how to bypass it)

I've got several users who have subsequently move department, or left the firm, and while they are assigned the old issues, it doesn't look like it'll clone them... or skip them?

Has anyone else run into this?

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events