Copy data from Epic to Task
Asked by Rohith k:

Hi Team,

When I link a ticket from Epic to create a Task, can I please have a check box to include everything (including attachments) from the Epic to copy to the Task.  
I have created the automation; I am getting the below error.

Error Message:  
Action details:  

##### **[Issue condition](https://elpaviation-sandbox-702.atlassian.net/jira/software/c/projects/CP2/settings/automate#/rule/21330559/574651548)** {#toc-hId--1444761928}

**The following issues passed:**  
**CP2-1287**  

##### **[Edit issue](https://elpaviation-sandbox-702.atlassian.net/jira/software/c/projects/CP2/settings/automate#/rule/21330559/574651549)** {#toc-hId-1042750905}

**Error editing issues**  
**CP2-1287 (Given parent issue does not belong to appropriate hierarchy., Issues with this Issue Type must be created in the same project as the parent. (pid))**Thanks!!


Answers:
author: Shreeja J
body: Hello [@Rohith k](/t5/user/viewprofilepage/user-id/5305853)

I wanted to check in to see if my previous reply was helpful or if there's anything else you need assistance with.  

Thanks,  
Shreeja J

comments: author: Rohith k
body: Hi [@Shreeja J](/t5/user/viewprofilepage/user-id/5379623)   

I have created the automation as per the screenshot, but it is not working as expected.  
We are creating task form the Epic ticket.  


author: Shreeja J
body: Hello [@Rohith k](/t5/user/viewprofilepage/user-id/5305853),

Could you please share a screenshot of the audit log for the automation rule?

Thanks,  
Shreeja J


author: Rohith k
body: [@Shreeja J](/t5/user/viewprofilepage/user-id/5379623) , please find the below audit log screenshot. The audit log was showing, issue has edited successfully, when we saw a ticket there is nothing updated from the epic  
![Screenshot 2024-08-26 152920.png](https://community.atlassian.com/t5/image/serverpage/image-id/343783iC8E4FD6D8BE8A360/image-size/large?v=v2&px=999 "Screenshot 2024-08-26 152920.png")![Screenshot 2024-08-26 153059.png](https://community.atlassian.com/t5/image/serverpage/image-id/343784i3ED1629AF80AC9A1/image-size/large?v=v2&px=999 "Screenshot 2024-08-26 153059.png")


author: Shreeja J
body: Hello [@Rohith k](/t5/user/viewprofilepage/user-id/5305853)

The automation will only copy data if it's present in the Epic. If there's no data in the Epic for the fields you're trying to copy, nothing will be transferred to the Task.

Please check if the necessary data is available in the Epic before running the automation.

Thanks,  
Shreeja J


author: Rohith k
body: [@Shreeja J](/t5/user/viewprofilepage/user-id/5379623)   

The Automation doesn't work, I found a different automation and it's working fine.  
Please find the below automation. Thanks for your help.  

![Screenshot 2024-08-26 193405.png](https://community.atlassian.com/t5/image/serverpage/image-id/343844i19AF33F0C95B4E2C/image-size/large?v=v2&px=999 "Screenshot 2024-08-26 193405.png")


author: Shreeja J
body: Hello [@Rohith k](/t5/user/viewprofilepage/user-id/5305853),

Thank you for reaching out. To address your request for copying all details, including attachments, from an Epic to a Task using automation, please follow these steps:

1. **Fix the Project Hierarchy Issue:** Ensure that the Task is created within the same project as the Epic to resolve the project hierarchy error.

2. **Update the Automation Rule:**

   * **Add Fields to Copy:** Configure your automation rule to include the specific details you want to copy from the Epic to the Task.
   * **Copy Data from Trigger Issue:** Set up your automation rule to pull data from the Epic (the trigger issue) and apply it to the Task, including attachments.

If you need further assistance please let me know!

Thanks,  
Shreeja J

comments: author: Rohith k
body: Hi [@Shreeja J](/t5/user/viewprofilepage/user-id/5379623)   

We are creating tasks in the same project only, but we are getting same error.  


author: Shreeja J
body: Hello [@Rohith k](/t5/user/viewprofilepage/user-id/5305853),

Since the tasks are being created in the same project, could you please share a screenshot of the automation rule you've set up? This will allow me to better understand the issue and offer more accurate assistance.

Thanks,  
Shreeja J


author: Rohith k
body: Hi [@Shreeja J](/t5/user/viewprofilepage/user-id/5379623)   

Please find the automation attached:  
![Screenshot 2024-08-22 184046.png](https://community.atlassian.com/t5/image/serverpage/image-id/343234i4185DA828ECAB201/image-size/large?v=v2&px=999 "Screenshot 2024-08-22 184046.png")


author: Shreeja J
body: Hello [@Rohith k](/t5/user/viewprofilepage/user-id/5305853),

Thanks for the update. It looks like the current automation rule might not be set up to copy values from the Epic to the Task correctly. Here's how you can set it up:

1. **Trigger**: Set the trigger to "Issue Created."

2. **Condition**: Add a condition to check if the issue type is "Task."

3. **Action**: Use the "Edit Issue" action. Configure it to copy fields like Summary, Priority, Parent, Description, and any other necessary fields from the Epic.

Ensure that the values are being copied correctly from the Epic issue to the Task.  
I have also attached a screenshot of the automation rule for your reference.  
![Screenshot 2024-08-22 221336.png](https://community.atlassian.com/t5/image/serverpage/image-id/343303iDB083ED37CBF3D55/image-size/large?v=v2&px=999 "Screenshot 2024-08-22 221336.png")  
This should help you copy the values from the Epic to the Task correctly.  
Let me know if you need further help!

Thanks,  
Shreeja J


Tags: atlassian

automation

cloud

jira-cloud