I have been trying to write a manual automation rule to clone an EPIC (or the selected issue) with all its sub tasks and then link them all as they were in the original EPIC:

I have tried many variations of this but all the Stories seem to stay linked to the original EPIC. I feel like I am so close that someone hopefully will be able to confirm the final steps for linking them up.
Thanks in advance.