Automation for JIra - cloning an epic and stories, how to copy same family structure for clones

Deleted user October 28, 2019

I am using the Automation for Jira add-on, and cannot figure out how to set an epic link for cloned stories in this scenario:

I have an Epic, "Epic 1" and two stories that are linked to this epic, "Story 1" and "Story 2".  I want to clone all of these issues, and set the epic link of the cloned stories to the cloned epic.  For example, I clone Epic 1 to create Epic 2, and I clone Stories 1 and 2 to create Stories 3 and 4.  Is there a way to set the epic link of Stories 3 and 4 to Epic 2?

Currently the epic link just carries over to the clones, so Stories 3 and 4 maintain an epic link of Epic 1.  I've looked through as many actions/ways to link as I could and I can't find a way to set the epic link in that manner.  There doesn't seem to be a way to look at the original epic, and then look at that epic's clones, and then set the epic link.  

I've tried just about everything I can think of in the actual rules, I am not too familiar with JQL/JSON but thought there may be a way to do this via that kind of customization?  Any help would be appreciated.  Thank you!

4 answers

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.
June 26, 2023

Hi, I'm Luka from codefortynine 👋

I just want to add that our app Deep Clone for Jira can clone whole issue hierarchies (Initiative ⇒ Epic ⇒ Task/Story ⇒ Subtask) with Epic/Tree Clone.

Deep Clone for Jira_Epic Tree Clone.gif

  1. Navigate to the issue you want to clone

  2. Click Action menu ••• > Deep Clone

  3. Select Epic/Tree Clone

  4. Configure and create your Epic/Tree Clone

As long as the parent and child issues are part of the clone, our app will keep the parent links. You can also decide to have Deep Clone link to parents that are not part of the clone.

2023-06-26 16-56.png

0 votes
Michael Cerantola June 19, 2023

This is super helpful. Thank you so much for sharing. You have saved me quite some time.

0 votes
Benoit March 13, 2023

For the Epic link, use the smartvalue:
{{#createdIssues.get(0)}}{{key}}{{/}}

Chris_Sterba April 19, 2023

This clones a new epic, and the stories underneath that epic but adds the new cloned stories to the old epic. The new cloned epic has no stories

0 votes
frother
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 28, 2019

Hi Andrew,

I am assuming your cloning the epic in the same rule? In that case, you can use the {{createdIssue.key}} in the epic link field to refer to it. For example:

 

Screen Shot 2019-10-29 at 9.17.39 am.pngLet me know if that works for you

Cheers,

Scott.

Deleted user November 14, 2019

Thanks a lot, this is helpful.  To answer your question, we do not always clone the epic and story in the same rule.  Sometimes individual stories may be cloned before the epic to be worked, while other stories in the epic are still being developed.  So I think that rule above would work if we clone all stories and the epic at once, but it wouldn't backfill the epic link we're looking for for stories that have already been created.

To explain expanding on the example in my initial question, this would be: Clone Story 1 to create Story 3.  THEN clone Epic 1 to create Epic 2, and Story 2 to create Story 4.  Using that rule, the {{createdIssue.key}} would set the epic link for Story 4 correct, as Epic 2.  But Story 3 would not have the Epic link of Epic 2.  Any help on that scenario would be much appreciated.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events