Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation to clone an epic that is not the issue triggering the automation?

Jenn Sherman
Contributor
November 8, 2021

When an epic is created and that epic has fields that meet certain conditions, I want a "template epic" (that already exists in the project) to be cloned.  Any ideas on how to do this?   Here is the start of my automation:

When issue created

Issue type = Epic

custom field 1 is not empty

if: matches (followed by some JQL)

 

What I want to happen next is I want existing issue PB-417 (an epic with children) to be cloned.

 

2 answers

0 votes
Alex Koxaras _Relational_
Community Champion
November 9, 2021

Hi @Jenn Sherman 

Try the following rule, but replace the IF statement (field) with yours, as well as the issue key with yours. Let me know if this is what you wanted to achieve.

clone epic with children.png

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.
November 10, 2021

Hi @Alex Koxaras _Relational_ 

What do you think about splitting the clone operation, to clone the template epic first and then clone the child issue?  In that way, the child issues can be correctly linked to the cloned parent epic, using {{createdIssue.key}}

As built, I do not believe that rule's clone action will re-map the linkages, parent to children.

Kind regards,
Bill

Alex Koxaras _Relational_
Community Champion
November 10, 2021

@Bill Sheboy indeed my friend! The children are not bind on the new epic and instead are linked to the original issue.

Alex Koxaras _Relational_
Community Champion
November 10, 2021

@Jenn Sherman I've got a question:

Say a user creates an Epic issue. You want this rule, even if the new issue an Epic, to clone nonetheless the PB-417 with its subissues? To my understanding perhaps you want to copy all values from PB-417 to the new issue AND close PB-417's subissues to the new epic. Am I right?

0 votes
Francisco Gomez Balastegui November 8, 2021

Hi, you can do this with ScriptRunner

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events