Automation: How to clone Epic WITH Child Issues AND their Subtasks

Luke
Contributor
January 24, 2024

I found this thread helpful at automating the "cloning" of Epics with Child Issues, however it does not pull in the Subtasks of those Child Issues. 

There was also a question in that very thread about the same thing but that specific part was NOT answered. 

This is what I have thus far. I tried to add another branch for cloning subtasks, since it doesn't seem to allow another "For" loop there, but I cannot add a branch WITHIN the prior branch (doesn't seem to like complex logic!). 

Screenshot 2024-01-24 185206.png

Please help!

EDIT: To be absolutely clear, the desired functionality is this: 

1/ Manually run automation rule inside Epic on Project ABC.

2/ Epic AND Child Issues AND Subtasks are cloned to same Project ABC.

[3/ Then I will manually move the Epic AND Child Issues AND Subtasks to Project XYZ, unless that can be automated too..]

4 answers

1 accepted

2 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2024

Hi @Luke 

For automation rules, branches cannot be nested...and branches which could be on more than one thing are run in parallel and asynchronously...with no guarantee of when the branch will complete, up to the last step of the rule.  (This is apparently by design to improve rule performance.)

In your scenario, this means the first branch to clone the child issues of the epic could still be running when trying to run the next branch to clone the subtasks for the child issues.  That is not going to work.

There are a few options for cloning issue hierarchies of more than 2 levels:

  • Purchase an addon from the Atlassian Marketplace for cloning
  • Build your own application which can clone the issues, keeping everything in sync
  • Try using multiple automation rules to clone the different level-pairings.  This can be tricky to get correct, selecting the correct issues and setting the parent.

Kind regards,
Bill

Luke
Contributor
January 25, 2024

Thanks Bill. 

Right, ok – that was my hunch too but I thought maybe, maybe, there was a chance! 

I think my biz is ruling out any more Atlassian apps & expenses, so that leaves some very hacky automation mixed with manual moving of items, or, writing something custom in house. 

Like Bill Sheboy likes this
Dustin MacBrayne
Contributor
July 26, 2024

Hey @Luke , I have a very similar problem!! Did you by any chance figure out a very hacky automation mixed with manual moving of items, or writing something custom in house to get this done lol? I've got double that. I have 5 issues at the 6th level, with about the same amount of children in the 5th level and so on down the line for each. Ive been really trying to figure out how to get this on a schedule trigger to be made once a year. One of our teams has the same deliverables every year but they are many. Id love to clone all those tickets with the starting info once a year with an easy automation or  figure out a way to have a 6 levels of tickets and all within get created each year via automation. Fine to put the work in on the automation to save a lot of manual data entry in the future! Hoping all is well and you figured this out lol

0 votes
Delfino Rosales
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 28, 2024
0 votes
Luka Hummel - codefortynine
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 26, 2024

Hi @Luke

I'm Luka from codefortynine 👋

If you can convince your company to give you more budget for Jira apps, you might want to give our app Deep Clone for Jira a shoot.

Deep Clone can clone whole issue hierarchies including subtasks with our Epic/Tree Clone Feature.

Luke
Contributor
January 29, 2024

Hi @Luka Hummel - codefortynine

I know Deep Clone, that's on my shortlist actually. We're just a bit budget restricted for now so I've been was trying a DIY solution in the meantime. 

Many thanks.

0 votes
Uday Kiran Bhaviri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2024

You can build or create a template project with the required hierarchy Epic > Tasks > sub-tasks.

Design 1:

In the real project where you want to create all the issues, you can build a workflow for an issue type. In the workflow post function (use any of the third party add-on like JMWE or JWT) and do the clone operation using the JQL query to fetch all the issues from the template project.

Make sure to link them properly like setting the epic links, parent keys etc.

Design 2: You can write custom groovy or api to achieve this and call the script file either from the automation or in the workflow post function.

Hope this will be helpful.

Luke
Contributor
January 25, 2024

Hi Uday, the first option is very interesting, thanks. 

Would you be able to provide an example of this as I didn't realise one could use the WF post functions in this way? 

Like Uday Kiran Bhaviri likes this
Uday Kiran Bhaviri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 30, 2024

As mentioned in the above create a template project with the required hierarchy as per your requirement

 

And then in the real project you can use the JMWE create multiple issues post function in the workflow to create that hierarchy of issues from the template.

 

Please go through the Multiple issue creation post function in JMWE 

 

https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/466256916#Multiple-issue-creation

 

https://innovalog.atlassian.net/wiki/spaces/JMWEC/pages/1110605827/Advanced+configuration+and+usage+of+the+Create+issue+s+post-function

 

https://www.google.com/amp/s/blog.isostech.com/quick-way-to-create-multiple-issues-using-the-jmwe-plugin%3fhs_amp=true 

 

Hope this will be helpful.

 

 

 

Sandra Perez
Contributor
November 13, 2024

Hola, habría alguna manera de clonar solamente las historias de ese epic?

Suggest an answer

Log in or Sign up to answer