Automatically clone a parent ticket including Subtasks

Mayur Patel December 9, 2022

Trying to automate a Jira ticket

When the ticket is "Done" it automatically clones the parent ticket and subtasks.

But, the subtasks are not cloned on to the new cloned parent ticket.

In other words, I want to Clone a Task with its Subtasks. And when I click on the cloned Task, I want to have the Cloned Subtasks linked in the cloned Task, as in the original Task.

 

2 answers

3 votes
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 9, 2022

Hi @Mayur Patel and welcome to the community!

On your Clone Issue action, you need to explicitly set the issue type to sub-task.  This will present an option for where you can set the parent.  

In the end, it should look something like this:

  • TRIGGER: Issue Transitioned (Done)
  • ACTION: Clone Issue
  • ACTION: Create Variable
    • varNewParent
      {{createdIssue}}
  • BRANCH:  Sub-Tasks
    • ACTION: Clone Issue
      • Issue Type = Sub-Task 
      • Parent = {{varNewParent}}

This should do the trick

Mayur Patel December 9, 2022
  • BRANCH:  Sub-Tasks
    • Parent = {{varNewParent}}

Silly question, where do I add this section 

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 9, 2022

Sorry - Edited my previous post to correct my miss

Mayur Patel December 9, 2022

I tried this before, but for some reason it only gives me 2 options

parent issue = current issue or parent issue = trigger issue

glitch.png

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 9, 2022

You can start typing {{varNewParent}} and it will let you set it as a smart value.

Mayur Patel December 9, 2022

It is coming up with an error

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 9, 2022

So this is a cross-project automation?  If so, you may need to perform an Issue Create for the sub-task instead of cloning and then manually set all of the fields that you want copied over.

Angela Chen
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!
February 4, 2023

Hi @Mark Segall 

Thanks for your answer, creating valuables works for the same project 

I am also facing with the same issue for cross-proejct automation. 

Would you mind elaborating more detail on the resolution you mentioned or any suggested adjustment on auto setting (refer to Pic2)? 

Stuck in this stage now. 

Snipaste_2023-02-04_16-37-52.png

Snipaste_2023-02-04_16-29-27.png

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 6, 2023

Hmm.... This looks ok on paper.  I'd take the following troubleshooting steps:

  1. Verify your variable component syntax is correct
    1. {{createdIssue}}
  2. In your branch, add a Log Action component with this to make sure it's recognizing the key for the first issue created above:
    1. {{varNewParent}}
Daniel Kim
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!
May 30, 2023

@Angela Chen When creating the variable, I used {{issue.createdIssue}} as the smart value and was able to successfully clone cross-project with subtasks under the parent. 

0 votes
Mayur Patel December 9, 2022

.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events