How clone a task and its subtasks ?

Olivier July 5, 2017

Hello,

I don't have the subtasks when I clone a task with subtasks. Is it possible to do it ?

8 answers

1 accepted

6 votes
Answer accepted
Ben Stuart
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 30, 2020

image (2).pngThis configuration will clone the sub-tasks when you're cloning based on a trigger. 

Arundev N B September 15, 2021

It really worked..  !! Thx :) 

Jeff Cadow he-him June 10, 2022

Hi, @Ben Stuart -

When I try this (in Jira Cloud Premium), the new Sub-task shows up among the children of the original Task rather than the children of the Task's new clone. I can verify it in the XML export of the new Sub-task; i.e., the key in the <parent id="integer">key</parent> node is that of the original Task. 

In a subsequent Edit Issue action, I modified the parent attribute in the Advanced Field editing control by creating a variable 'myParentKey' then using the JSON { "parent" : "{{myParentKey}}" }. I verified that it succeeded: the XML export of the new Sub-task had the parent node set to the new Task's ID and key.

However, the new Sub-task clone still shows up in the original Task's children.

Can you please verify that your suggestion from April 30 2020 still works?

Thanks.

0 votes
Janis Zapata May 6, 2022

Buenas tardes,

Si necesitan clonar subtareas de un issue especifico a otro, pueden hacer lo siguiente:clone.png

¡Me funcionó bien!

Saludos.

0 votes
Olivier August 31, 2017

Hello Nick,

Thank you for your answer.

0 votes
Olivier August 28, 2017

Hello Nick,

I did it with 2 rules but I have an another problem...The subtask have links between them (block by etc...) and when I clone the subtasks the links are not clones...I lost all my links, too bad.

Do you have an idea.

Nick Menere
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 31, 2017

Unfortunately we can't clone issue links yet.

We are tracking this at: https://codebarrel.atlassian.net/browse/AUT-162

You can add the links to the description of the issue or asa comment, not perfect but it is workable.

 

Cheers,

Nick

Javier Ortiz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 27, 2019

I need to do the same and wanted to know which combination of rules you used to clone botht the issue and the subtasks?

0 votes
Olivier August 28, 2017

Hello Nick,

It in not exactly what I would like to do. 

"When I create an issue A then I clone an issue B and for this issue I clone their sub-tasks...and I delete the issue A"

But I can not add "And:For Sub-tasks" in the JQL branch...

See the the screen shot below2017-08-28_0933.png

0 votes
Olivier July 17, 2017

Hello Nick,

I'm sorry to answer you so late...

I've tried to do what you told me but it is too difficult...I'm not an expert yet in the pluggin settings.

For example...I have a trigger "When: Issue commented" and an action "Then: Clone issue into same project and same issue type"...after that I don't know what to do to clone the subtasks of the task...sorry.

Cheers,

Olivier

Nick Menere
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 20, 2017

Oliver,

I tried the following locally and it succesfully craeted clones sub-tasks.

Screen Shot 2017-07-21 at 3.16.12 pm.png

Let me know if you get it working.

 

Cheers,

Nick

Anil kumar Bondada
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 8, 2019

@Nick Menere 

Hi Nick, 

I came across this awesome workaround when looking for options to clone a task along with it's children. Unfortunately, when I try the same rule with the given advance settings, I'm getting the following error for sub tasks cloning piece.

Error - creating issueIssue type is a sub-task but parent issue key or id not specified. (issuetype)

 

Could please assist me on this? 

Nick Menere
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 15, 2019

Hi Anil,

 

Best to raise a support request with this one so we can figure it - https://codebarrel.atlassian.net/servicedesk/customer/portal/1

 

Cheers,

Nick

Rick Crow
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2020

Was this issue ever resolved? I'm successful when attempting the above, but I'm seeing that the resulting subtasks are created in the reverse order as compared to the original list, which is problematic for our use case. In attempting to overcome this using JQL to 'force' the Rank order, I then get the same error message Anil reported.

Thanks!

@Anil kumar Bondada @Nick Menere @Ben Stuart 

Like # people like this
Veve November 3, 2020

@Nick Menere you're awesome, thank you!

0 votes
Nick Menere
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 5, 2017

Oliver,

 

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 teh parent of teh cloned issue to the first issue created in the rule - in this case the original clone.

 

Let me know how you go.

 

Cheers,

Nick

Olena Drozd-Korolova
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 31, 2018

Hello Nick,

Unfortunately, this (great) workaround no longer works. It now returns an error to the Audit log:

CREATE ISSUE

Error creating issue Issue type is a sub-task but parent issue key or id not specified. (issuetype)

Regards,

Olena

0 votes
Dave Theodore [Coyote Creek Consulting]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 5, 2017

There are a number of add-ons that can do this, with varying features.  You will need an add-on of some sort to do this, though.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events