Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hello Hoang,
Welcome to Atlassian Community!
Searching using the details you provided, I was able to find a thread from 2017 with a workaround to use the advanced mode to copy the subtasks when cloning a Task.
Currently, it's not possible to do this automatically because there is no option to select to copy the subtasks.
We are tracking the ability to clone subtasks automatically at - AUT-335
In the mean time, you can mnaully loop over the sub-tasks of the original issue and clone these. You will need to overwrite the parent in the advanced section with:
{
"fields": {
"parent": "{{createdIssues.first.key}}."
}
}This will set the parent of the cloned issue to the first issue created in the rule - in this case the original clone.
Please, give it a try and let us know how it goes.
Regards,
Angélica
Hi @Angélica Luz, I ran across the same 2017 post that seemed to be exactly what I was looking for. Unfortunately, then I realized that the resulting cloned subtasks had the reverse rank order as compared to the original list of subtasks. This is especially problematic for our use case as there are over 100 subtasks and the order is critical. Manually re-ranking the list is clearly not an ideal solution. Any thoughts?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Angélica Luz - the JSON you included in your Mar 11 2020 reply generated an error for me. The parent property is evidently not a field, it is a root level attribute. I rewrote the JSON as this and it modified the issue's parent:
{
"parent" : "{{createdIssue.key}}"
}
Unfortunately, even though this set the parent value as I hoped it would, the cloned Sub-task still showed up as a child of the original Task instead of a child of the original Task's new clone, as I mention here. If I've uncovered a bug, please reply and I'll create a bug report. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Context is important for automation rules, and so please post images of your entire rule and the audit log details. That will show which issue is being used as the source for adding the subtask, and what adjustments are needed to fix the symptom. Thanks!
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @[deleted] - Oops - sorry!
I finally got my automation rule to properly link the new Sub-task clones to the new Task clone. It entailed creating a variable to hold the new parent Task.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well done! You could also do that without the created variable by referencing the value directly as {{createdIssue.key}}
Your version works because created variables are currently text-only, and the default smart value (field) returned for {{createdIssue}} is the key.
In the future, I hypothesize that created variables might preserve the object/type of the source smart value. For example, text, numeric, list, issue, etc. If that happens your rule will probably still work due to the default smart value for an "issue", but if it doesn't that may be the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jeff Cadow he-him @Bill Sheboy This is great, I appreciate the screenshot. I have a slight variation I'm trying to get working and the standard solutions that come to mind seem to just get ignored. My goal is for the Task and Subtask Status to get cloned over as well. My task Status changes correctly, however the cloned Subtask Status is not cloning over correctly.
I have tried just about every Action/Condition within my For Sub-tasks branch but nothing will clone the Subtask Status properly.
Here's a drawing to further explain my delima.
Original Task (Status = To Do)
Original Sub-task (Status = To Do)
-->
Cloned Task (Status = In Progress)
Cloned Sub-task (Status = To Do)
As you can see the Cloned Task status changes perfectly, but the Cloned Sub-task Status does not follow the workflow. The Cloned Sub-task should now have a status of In Progress.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just for visibility, there's also a separate question for Brandon's query :) - see: https://community.atlassian.com/t5/Jira-Software-questions/Cloned-Sub-task-not-copying-proper-Status/qaq-p/2233327
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Likewise, when I clone sub-tasks, the status reverts to the beginning workflow status. In my case this is the "To-do". It does not receive the same status of the sub-task it was copied from. I'll create a new ticket for this topic, since I have a simpler scenario than brandon.bradshaw@maritz.com's.
New ticket:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://community.atlassian.com/t5/Jira-articles/Clone-Epic-Stories-and-Subtasks-tree-with-Jira-Automation/ba-p/2316387 - another solution, which worked great!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does it copy the statuses properly, especially when the status is not "To-do" (the beginning workflow status cloned sub-tasks default to)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.