Can I automate to clone a task from one project to another and create subtask at the same time?
Asked by Md_ Abrarul Huda:

I have an automation running to clone a task from one project to another when status is changed. Can I also create a sub-task for the clone in the same process?


Answers:
author: Trudy Claspill
body: Hello [@Md_ Abrarul Huda](/t5/user/viewprofilepage/user-id/5516667)

I believe that you can.

After the Clone Issue step add a Branch -for each Related issues / most recently created issue. That should shift the context to the issue created by the Clone action. Then you can add a Create Subtasks action inside that branch.

comments: author: Md_ Abrarul Huda
body: I can't seem to do it after cloning between 2 different projects. If I add a transition inside one project, it works perfectly. But after I have moved to a different project I got "Issues with this Issue Type must be created in the same project as the parent. (project)" error.


author: Trudy Claspill
body: Please paste screen images showing the current state of your rule, and all the details from the Audit Log for execution of the rule.

Also on the Rule Details page what have you set as the Scope of your rule?


author: Md_ Abrarul Huda
body: Attaching 2 screenshots. I guess the problem is visible. But how to solve it is the issue.![Screenshot 2024-06-23 093743.png](https://community.atlassian.com/t5/image/serverpage/image-id/331257i9FA9013BF5E1E516/image-size/large?v=v2&px=999 "Screenshot 2024-06-23 093743.png")![Screenshot 2024-06-23 093655.png](https://community.atlassian.com/t5/image/serverpage/image-id/331258i27F3903442BCF324/image-size/large?v=v2&px=999 "Screenshot 2024-06-23 093655.png")


author: Trudy Claspill
body: I notice that while you said you are coming an issue, you are actually using the Crest issue action instead.

Please share the details of the step where you are creating the subtask.

Additionally what is the scope of the rule specified on the Rule Details page?


author: Md_ Abrarul Huda
body: I was initially cloning an issue. But then I tried the create new issue action.

![Screenshot 2024-06-23 122448.png](https://community.atlassian.com/t5/image/serverpage/image-id/331263i9412D4C5B2A25DA9/image-dimensions/237x287?v=v2 "Screenshot 2024-06-23 122448.png")![Screenshot 2024-06-23 122557.png](https://community.atlassian.com/t5/image/serverpage/image-id/331267i908C479DF851E70A/image-dimensions/251x301?v=v2 "Screenshot 2024-06-23 122557.png")


author: Trudy Claspill
body: You need to implement the solution I detailed in my first response - use of a For Each branch after you create the new parent issue. The add the step to create the subtask as a subordinate step in that branch.

In your current implementation you are setting the parent of the subtask to Current Issue which, in this case, is a reference to the trigger issue rather than the issue you just created. You have to use a Branch to shift the focus to the newly created issue.

You may also need to change the scope of the rule to be multiple projects and list the project that contains the trigger issue and the project where you are creating new issues.


author: Clara Belin-Brosseau
body: Hello [@Md_ Abrarul Huda](/t5/user/viewprofilepage/user-id/5516667)

If you're seeking for an easier way to**clone an issue on a status change with their sub-tasks** , you can try [our app Elements Copy \& Sync](https://marketplace.atlassian.com/apps/1211111/elements-copy-sync-clone-jira-issues?tab=overview&hosting=cloud?&utm_source=community&utm_medium=answer&utm_campaign=question_2731591&utm_keyword=CS&utm_vendorID=4952) that allows you to clone and sync issues with all their content (summary, description, custom fields, comments, attachments, etc.) and their child issues.

You can check our guide [here](https://doc.elements-apps.com/copy-and-sync-jira-cloud/copy-all-issues-from-one-project-to-another?&utm_source=community&utm_medium=answer&utm_campaign=question_2731591&utm_keyword=CS&utm_vendorID=4952).

You can try the app for **free during 30 days** (and it stays free under 10 users).

Kind regards,

Clara


Tags: cloud

jira-cloud