Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,465,475
Community Members
 
Community Events
176
Community Groups

clone an epic including its child issues

Is it possible to clone an Epic including its child issues in Jira Software without paying for deep cloning  

5 answers

1 accepted

6 votes
Answer accepted
Mark Segall Community Leader Jul 28, 2022

Hi @Sama Mohamed - You could do this with automation:

  • TRIGGER: Manual
  • CONDITION: Issue Type = Epic
  • ACTION: Clone Issue
  • ACTION: Create Variable varNewEpic
    • {{createdIssue}}
  • BRANCH: Stories (or Other Issues in Epic)
    • ACTION Clone Issue
      • Epic Link
        • {{varNewEpic}}

Hello Mark, thank you for your answer. 

Can you kindly clarify this part :

  • ACTION Clone Issue
    • Epic Link
      • {{varNewEpic}}

where do I put the Epic link and varNewEpic?

Like ricardo.fortes likes this
Mark Segall Community Leader Jul 29, 2022

On your clone issue action, you'll want to copy/paste this into the Epic Link section:

{{varNewEpic}}

@Mark Segall I did what you have told me and the result was that all the issues inside the epic were cloned at the same time but they weren't cloned with their epic, they were cloned each separately as a different issue, do you know how I can put them all inside one Epic? 

For example :

This is my Epic with its child issues 

image.png

when manually triggered this is the result:

image.png

I want to put them inside a new epic automatically, and I want to clone the description of them as well

Mark Segall Community Leader Jul 29, 2022

I've used this rule before and it should be placing them inside the epics.  Can you confirm whether this project is a company managed or team managed project?  If it is Team Managed, you'll need to change the field on your CLONE ISSUE action to use the Parent field instead.

Yes, its a Team Managed project 

@Mark Segall you meant this way right?

image.png

Mark Segall Community Leader Jul 29, 2022

You need to change the Epic Link field to Parent.  Team Managed projects don't recognize the Epic Link field.  

@Mark Segall Hello, I would like to clarify something from you, Actually, I have tried the same rule in a company-managed software project and what happened is that the tasks were cloned, all of them inside the same Epic again

 

I want to extract them from the Epic and put them in a New Epic

Mark Segall Community Leader Aug 02, 2022

Hi @Sama Mohamed - I'm looking at your screenshot.  You're just missing the first clone action which clones the epic itself.  Without this, the variable remains empty and the issues simply clone inside the same epic.

@Mark Segall can you kindly elaborate on this screenshot and tell me where exactly I should insert the cloning action? , sorry for the number of questions, and your help is really appreciated. 

image.png

Mark Segall Community Leader Aug 02, 2022

Between your condition and create variable action.

@Mark Segall Thank you so much it worked :) :) 

Like Mark Segall likes this

@Mark Segall 

Actually, the rule worked perfectly, and thank you for that,

I want to ask you If you can guide me on how to add something to the rule which can clone the sub-child issues as well under the child issues, 

for example:

These are the child issues:

Child issues.png

These are the sub Child Issues:

Sub Child issues.png

Like # people like this
Mark Segall Community Leader Aug 09, 2022

Getting into the sub-tasks is a little more tricky.  I've been thinking of the best way to handle it and I think this would be the best approach:

  1. On your rule, you could add an edit issue action after the clone action that adds a label to the template task.
  2. Create a second rule that will perform the sub-task copy and clear out the label upon completion:
    1. RULE DETAILS: Check the box "Allow Rule Trigger"
      2022-08-09_09-53-24.jpg
      2022-08-09_09-49-56.jpg

So what will happen here is that as each task is cloned, it applies a unique label on the template task which will trigger a second rule to clone all of its sub-tasks.  Once the sub-tasks are all cloned, it clears the label.

@Mark Segall I did it this way but didn't work can you check here

image.png

subtasks.png

Mark Segall Community Leader Aug 12, 2022

On your Cloning Epic rule, it appears that you're removing the label in your edit issue action.  This should be an ADD here because this is what will trigger the Cloning Sub-Tasks rule.  Then at the end of the Cloning Sub-Tasks rule, you should REMOVE that label.

@Mark Segall I have amended it as you have mentioned and changed to ADD label  in Cloning Epic and at the end of the Cloning Sub-Tasks rule I have REMOVED the label but still didn't work, I am not sure where is exactly the problem 

cloning epic.png\

for the Cloning Sub-Tasks :

1.

cloning sub tasks.png

2.

sub tasks.png

Do you think there are any problems in my implementation here? 

 

@Mark Segall the problem is that the cloning subtasks doesn't get triggered.

Mark Segall Community Leader Aug 15, 2022

For your Cloning Sub-Tasks rule, under Rule Details, make sure the checkbox is set for 

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.

@Mark Segall, I actually got 2 actions that happened due to the cloning subtasks rule which are 

1. Loop happened that copies the epic itself 10 times but when it is copied 10 times it's totally empty

2. The original issue which I cloned from, created the same subtasks inside one more time and non of the child issues of the subtasks were cloned

I also already ticked in the rule details Allow rule trigger as you have previously mentioned

This is the loop

  image.png 

This is the original Issue 

Screenshot 2022-08-22 101240.png

Did I do anything wrong here in cloning subtasks :l 

4.png3.png2.png1.png

5.png

Mark Segall Community Leader Aug 22, 2022

Hi @sama mohamed - The screen shots you shared look correct for the second rule.  If you're getting extra clones of your epics, that is likely an issue with your first rule - specifically, at what level you're adding the label.  Based upon the symptoms, you're adding the label to the epic instead of the individual tasks.  In your first rule, make sure the label is added as part of the clone action like this...

 

2022-08-22_06-41-07.jpg

Hi @Mark Segall ,

Do you know how to figure out this?

When cloning the subtasks they are linked to the original issue, and I couldn't find a way to assign those subtasks to the new cloned issue, I add detail in another comment.

 

Thanks

Hello, @Mark Segall Firstly thank you for this amount of help it's really appreciated, mmmm I would ask you to kindly watch my first rule and tell me what exactly are the mistakes since there is nothing wrong with the second rule as you have previously mentioned, since I have tried testing a lot the past days, and I am getting a lot of loops but didn't work as well :(, @Iván Muñoz this is my same issue, I will post the screenshots now and you can see what's wrong. after Mr.Mark can guide us.

Also,

Note: I have changed my unique label in the 2 rules to CTI as seen

1. This is the whole rule

image.png

2. First Cloning Action

image.png

3. Branch rule for stories and other issues in the Epic 

image.png

 4. This is the second Clone Issue Action

  Note :

I have added the label here because you have mentioned that I need to add the label to the level of issues level inside the epic 

image.png

5. Edit Issue Fields 

image.png

I followed the same rule in this post  but it only clones the epic without the stories.

NOTE: Removed my images. Did not realize it would all expand and spam the space.

 

Mark Segall Community Leader Sep 14, 2022

Hi @Endre and welcome to the community!

If I may ask, can you please create a new question in the community for this?  You can reference this question/answer and @mention me so I get pinged on it.  This thread was already a long one and I just want to make sure your question doesn't get lost.

Thanks Mark. Finally I figured out the issue. I thought the manual trigger would trigger when I manually select Clone from the issue action menu. Still not sure what is manual trigger so used a different trigger that actually turned out as a value add. I share it here in case someone find it useful.

 

I replaced the manual trigger with  trigger value change on epic name. To start the cloning I change my template epic name to the epic name I want for my new project. Then as the last step of the cloning automation I reset my template epic name to original value. This way my cloned objects already named what I need them to be.

I still struggle cloning the checklist but I will post that as new question. 
John Funk Community Leader Sep 22, 2022

Can you post the final rule here? 

Mark Segall Community Leader Sep 22, 2022

@Endre - Manual triggers are executed from within an issue.  You should see something like this:

2022-09-22_13-28-27.jpg

Thank you Mark.

Like John Funk likes this

@John Funk  here is my automation and clone steps and result.

 Jira epic clone on template epic name change.pngcloning steps and result.png
Please LMK if you see any flaws or suggestions.


NOTE: Automation  steps I did not put comment on  are the same as in the original solution of this post.

John Funk Community Leader Sep 26, 2022

Thanks, @Endre !

Hello @Mark Segall

I also have a problem with automation, it clones the Epic but nothing else, can you help me with this? 

Even when I turn the subtask cloning off, it only clones the Epic.

chrome_1EkTqbJJuA.png

chrome_1bIApwlX4d.png

And also the sub-task cloning:

chrome_JB5Mnd4Ce5.png

chrome_gMFz4jpwso.png

Are there any mistakes or...? I can't figure this out on my own, have been at it for 2days straight now.

I'm using a Team-based project board...

 

Edit: idk why I got put in the middle, when clearly I was answering in the end.

Mark Segall Community Leader Nov 28, 2022

Hi @Henri Oru - Can we please move this to a new question (just @mention me in the new question)?  This one has gotten quite long and will be difficult to continue managing.  

Hello,
I followed all the steps which were very well detailed, I was able to clone epics with their issues, but for the step of cloning the subtasks of the issues present in the epic, what happens to me is that when I clone the subtasks through the second automation rule, these subtasks are linked to the initial issue and not to the new cloned one, for example:

- Epic 1
  -Issue A
  -Issue B
    - Subtask 1
    - Subtask 2

When cloning it is as follows, the original epic:
- Epic 1
  -Issue A
  -Issue B
    - Subtask 1
    - Subtask 2
    - Clone of Subtask 1
    - Clone of Subtask 2

The new cloned epic
- Clone of Epic 1
  - Clone of Issue A
  - Clone of Issue B

The problem is that when cloning the subtasks they are linked to the original issue (Issue B), and I couldn't find a way to assign those subtasks to the new cloned issue (Clone of Issue B).

In the case of cloning epic and its issues, there is a condition that changes the EpicLink of the new issues.

At the moment I have not found how to make that relationship for the subtasks with the new cloned issue.

  

Mark Segall Community Leader Aug 26, 2022

Hi @sama mohamed / @Iván Muñoz 

Here are screen shots of the two rules:

RULE 1 - Clone Epic and Stories

2022-08-26_06-04-46.jpg2022-08-26_06-06-37.jpg2022-08-26_06-06-44.jpg

The key aspects of this 2022-08-26_06-09-50.jpg

The key pieces to this rule are:

  1. Establishing a link to the template issue so we have an anchor for each issue to find relevant sub-tasks (we'll remove this later)
  2. Adding a label so automation can identify which issues it needs to act against (also removed later)

Rule #2 - Clone Sub-Tasks

2022-08-26_06-18-57.jpg

2022-08-26_06-06-28.jpg

So explanation on the second rule:

  1. Triggers off of the added label which is on the template issue
  2. Performs a lookup to find its newly created clone
  3. Branches into each sub-task
  4. Clones each sub-task... A couple of notes on this one:
    1. I'm explicitly setting the issue type to Sub-Task in the clone action so I can specify the parent issue otherwise the sub-task gets created under the existing issue.  This is why we added the lookup action above
    2. SUB-TASKS CAN ONLY BE CLONED TO THE SAME PROJECT - So, if you're looking for something where the template can be cloned to other projects, it's going to get a lot more complicated
  5. Cleans up the label and link - If we don't add this, weird duplication can occur in the future.
Like James Cooper likes this

@Mark Segall thank you so so much for your effort the rule has finally worked as charm :))) that was so helpful, I can't imagine, and thank you for explaining the logic behind it.

 

@Iván Muñoz Hi Ivan, please follow the steps that Mr.Mark has written, it will work perfectly but a small note here, in the yellow arrow please put the cloneAction label in (Values to add not in Values to delete) in order for it to work 

image.png

Like Mark Segall likes this

Hi @Mark Segall  and @Sama Mohamed

I already get working the automation, with this I can move forward in my processes and save a lot of time manually cloning epics/issues/subtasks, thanks a lot.

One more question..


From what I see the cloning process or cycle is done in parallel, I was looking for a way that when cloning an epic, the order of the issues/subtasks was the same as that of the original/template.

At this time in some it does and in others it doesn't for example:
-Epic 1
    -Issue A
    -Issue B
        -Subtask 1
        - Subtask 2

The new cloned epic
- Clone of Epic 1
    - Clone of Issue B
        -Clone of Subtask 2
        -Clone of Subtask 1
    - Clone of Issue A

Do you know of any way in which the cloning cycle is done in ascending order based on the Issue ID?

Thank you very much in advance for the help.

Mark Segall Community Leader Aug 29, 2022

Hi @Iván Muñoz - Unfortunately, automation sequencing is largely out of control and there are a number of threads about this in the community.

The alternative is a 3rd party app like bulk clone or deep clone.

 Hello, @Mark Segall 

I would like to ask you if this can help in making our cloning in sequence:

to add the sorting function to our variables or smart values: 

like this for example:

.sort(name, "DESC")

will this work to clone subtasks or tasks in sequence?

Mark Segall Community Leader Nov 03, 2022

Hi @Sama mohamed  - That link is for an open suggestion which would indeed be a nice feature add, but sadly it's only a suggestion at this time.

What if the epic I would like to clone contains linked issues in other projects. Anything special I would need to include in the automation so the new epic also contains the cloned issues in those other projects?
We use company based projects.

Thanks!

0 votes
John Funk Community Leader Jul 28, 2022

Hi Sama,

Not that I am aware of. But it will be well worth your money in my opinion.  :-)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS

Atlassian Community Events