How to use automation to copy fields into a linked task?
Asked by Susan Merola:

Hi everyone. I'm having trouble with linked issue automation and am hoping you can tell me where I'm going wrong.

The below shows my use case and how I've tried to set up an automation to copy some fields from a manually created issue that triggers the creation of a linked issue into that newly created linked issue. But when I ran this automation no fields were copied and the audit log said no action was taken because no related issues could be found.

I'm not sure if it matters but I am working in a team-managed project. And yes, the linked task is being created within that same team-managed project.

Thanks in advance for any feedback or suggestions!

![automation.png](/t5/image/serverpage/image-id/340766i482AF0362D4F84B9/image-size/large?v=v2&px=999 "automation.png")


Answers:
author: Pablo Vergara
body: Hi [@Susan Merola](/t5/user/viewprofilepage/user-id/5305549)

Per your description below, I don't see the action to create the new linked issue on the rule. Is that missing? - that could be why you see the message in the audit logs.

I've done a quick test using a team-managed project and an automation rule that represents what I think is an equivalent use case. I just added the step to create the new linked issue.

Feel free to review and take it as a baseline to improve what you have further.

-

The below shows my use case and how I've tried to set up an automation to copy some fields from a manually created issue ***that triggers the creation of a linked issue into that newly created linked issue***.

-

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

comments: author: Susan Merola
body: Hi [@Pablo Vergara](/t5/user/viewprofilepage/user-id/5402294) . Thanks for your reply.

Yes, the automation to create the linked task happens in a separate automation, so I'm going to try Trudy's suggestion of adding a delay and if that doesn't help then I'll try combining the 2 automations so that the linked issue gets created and the fields get copied within the same automation as you've suggested above.


author: Trudy Claspill
body: Hello [@Susan Merola](/t5/user/viewprofilepage/user-id/5305549)

Welcome to the Atlassian community.

Thank you for providing the screen image.

Can you also provide the details from the Audit Log for the execution of the rule?

How are the linked issues getting created? Is that done during a separate automation rule? I don't see any steps in this rule to create and link issues.

If the linked issues are created by a separate rule, then you are likely running into a timing issue where this rule is executing before the other rule that creates and links the issues.

There is a new Delay action that you could add to this rule after the trigger to pause it and allow time for the other rule to finish creating and linking the other issues.

<https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Delay>

comments: author: Susan Merola
body: Hi [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011). Thanks for the welcome and for the quick resposne!

Yes, I have a separate automation that runs when I first create the Delivery task for my team. In that automation, several sub-tasks are created and the linked issue is also created. So it could very well be the problem is that the automation to populate the linked issue needs to run on a delay. I'll try that and see how it goes.

This is what the automation said. 11373 refers to the Delivery task.

![automation2.png](https://community.atlassian.com/t5/image/serverpage/image-id/340788iC79D1E0FD2990B1C/image-size/large?v=v2&px=999 "automation2.png")


author: Trudy Claspill
body: Based on the output the rule is saying no linked issues exist. Since both rules are triggered by "Issue Created" it is a good bet that using the Delay action will resolve the issue.


author: Susan Merola
body: Hi [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011). I just tried again after adding in the delay and that totally worked! Thanks for your help and for letting me know about this handy feature that will be helpful for future automations too!


author: Trudy Claspill
body: You're very welcome!


Tags: cloud

jira-cloud