Hi,Is it possible to clone task and subtasks with Jira automation?https://support.atlassian.com/jira-software-cloud/docs/move-an-issue-with-automation/
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.
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?
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.
Hi @Jeff Cadow he-him
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
https://community.atlassian.com/t5/Jira-articles/Clone-Epic-Stories-and-Subtasks-tree-with-Jira-Automation/ba-p/2316387 - another solution, which worked great!!
Thank you for the heads up on this solution; it's perfect!
Does it copy the statuses properly, especially when the status is not "To-do" (the beginning workflow status cloned sub-tasks default to)?
It looks like you're new here. Sign in or register to get started.