Automation to move a cloned issue from one epic to another in a different Jira project
Asked by Mateja Leskovec:

Hello everyone,

I'd like to understand if it's possible to set the following automation:  

Each team working on a product has their own Jira project. Their work is tracked in different epics under one initiative per product. As the products are kicked off, the epics are created - meaning that each project has it's unique initiative and respective epics.

At one point we'd need to clone a ticket from Project A to Project B, but also track it under the epic of Project B.

Does the automation support this?

Thank you!


Answers:
author: Trudy Claspill
body: Hello [@Mateja Leskovec](/t5/user/viewprofilepage/user-id/5408580)

Are these Company Managed projects?

Automation has a Clone issue action that would allow you to specify another project as the destination. In that action you can also set the fields in the newly created issue, and that would include setting the Parent of the new issue to match the source issue

This works only between Company Managed projects.

comments: author: Mateja Leskovec
body: Hello Trudy,

we would need also need the Parent of the newly created issue to change to a different epic under the same initiative.

So the completion of the original issue in Project A and under Epic C would created a clone of X in the Project B and under Epic D, but both housed under the Initiative X.


author: Trudy Claspill
body: The Clone action allows you to set the Parent field, which is how you identify the parent/Epic for the newly created issue. Here is a simple example where you know the explicit issue key of the Epic.

![Screenshot 2024-07-22 at 8.28.12?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/337079i4DD4CD2FFFCE3ADB/image-dimensions/353x373?v=v2 "Screenshot 2024-07-22 at 8.28.12?AM.png")

The next thing you have to determine is how you will know what Epic to specify. Do all the cloned issues go to the same Epic, every time? Or is there some logic you need to execute to determine the Epic that will be the parent of a particular clone?


author: Mateja Leskovec
body: Hello Trudy,

every time is a different epic under the same initiative, so the automation would have to figure that out while cloning the issue.


author: Trudy Claspill
body: If it is going to be a different Epic each time you are going to have to provide some logic for how that Epic would be determined.

If you were doing this task manually how would you determine the destination Epic?

Alternately you could use a Manually triggered automation rule where your user would manually trigger the rule to clone the issue. With a manually triggered rule you can prompt the user to enter the issue key for the destination Epic and then use that dynamic input within the automation rule to set the parent of the newly created issue.


author: Luka Hummel - codefortynine
body: Hi [@Mateja Leskovec](/t5/user/viewprofilepage/user-id/5408580)

If you are willing to try a third-party app, you can try our [Deep Clone for Jira](https://marketplace.atlassian.com/apps/1218652?utm_source=atlassian&utm_medium=referral&utm_campaign=deepj-new-reach-com-2757995).

Deep Clone can keep the original Parent Link when cloning issues to other projects.

![2024-07-19 11-16.png](https://community.atlassian.com/t5/image/serverpage/image-id/336662i36CD6B6E4E0EF2D9/image-size/large?v=v2&px=999 "2024-07-19 11-16.png")

comments: author: Mateja Leskovec
body: Hello Luka, we would want this to be an automated process, not a manual one.


author: Luka Hummel - codefortynine
body: Hi [@Mateja Leskovec](/t5/user/viewprofilepage/user-id/5408580)

That's not a problem, you can use Deep Clone together with Jira Automations and use a normal Jira Automation trigger to start a Deep Clone. You can read more on that [here](https://documentation.codefortynine.com/deep-clone-for-jira/jira-automation#AutomationforJiraviaWorkflows-HowtoTriggerDeepCloneFromJiraAutomation(Company-managed)?utm_source=atlassian&utm_medium=referral&utm_campaign=deepj-new-reach-com-2757995).

You then can also use the [Field Editor feature](https://documentation.codefortynine.com/deep-clone-for-jira/field-editor?utm_source=atlassian&utm_medium=referral&utm_campaign=deepj-new-reach-com-2757995), which allows you to set a new Parent for the cloned issue(s). Furthermore, you even can use [Jira Expressions](https://documentation.codefortynine.com/deep-clone-for-jira/jira-expressions?utm_source=atlassian&utm_medium=referral&utm_campaign=deepj-new-reach-com-2757995) to set a dynamic parent.

![2024-07-22 17-32.png](https://community.atlassian.com/t5/image/serverpage/image-id/337081i706F14F76783EAFA/image-size/large?v=v2&px=999 "2024-07-22 17-32.png")


Tags: cloud

jira-work-management-cloud