Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to clone subtask using automation?

AkLike August 6, 2024

 

There is a task, there are several different subtasks in it, some of them need to be cloned when their (subtasks) status changes. How do I do this?

3 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
AkLike August 8, 2024

I found a solution
In the "Then" item "Clone task" in the "Parent" field, write {{subtask}}

0 votes
AkLike August 8, 2024

Try to explain it again. There is a task, it has subtasks. I need to transfer the status of a Subtask to, say, "In progress", and under this condition, the subtask for which I changed the status should be cloned there, with the same parameters and data. By changing only the task type field.

0 votes
Seon Shakespeare
Community Champion
August 6, 2024

Hi @AkLike,

You can definitely automate this sort of thing in Jira using automation rules!

Project settings > Automation

You'll essentially want to set up a rule that triggers when a subtask's status changes to a specific status, and the action to clone the subtask.

For more detailed instructions and configuration options, check out Atlassian's automation documentation: https://www.atlassian.com/software/jira/guides/automation/overview#what-is-automation

Hope this helps!

AkLike August 7, 2024

It turns out that I configured that when the task status changes, the task should be cloned, with the same parent, etc., but it does not work

Seon Shakespeare
Community Champion
August 7, 2024

Hi @AkLike

It sounds like you might be running into some confusion with how Jira handles Tasks and Sub-tasks within automation.

To make sure we're on the same page, could you clarify a few things?

  • When you say "Task", do you mean a standard Jira issue, or a sub-task of another issue?
  • What is the "Parent" you're referring to? Is it an Epic, another standard issue, or something else?

A screenshot of your current automation rule configuration would also be super helpful in troubleshooting this!

AkLike August 7, 2024
  • A subtask of another task
  • Parent, that's what I called the main task.

2.jpg

Seon Shakespeare
Community Champion
August 8, 2024

Hi @AkLike 

Thanks for providing the screenshot and clarifying your goal! It looks like you want to automatically create a new "Back-end" sub-task whenever a parent task transitions to the "Integration" status.

While it's technically possible to clone the existing "Back-end" sub-task using automation, I'd recommend using the "Create sub-task" action instead. Here's why:

  • Fresh Data: Cloning would create a copy of the existing sub-task with all its current data, which might not be what you want if the intent is to start a new "Back-end" effort. Creating a new sub-task ensures you have a clean slate.
  • Customisation: The "Create sub-task" action allows you to pre-fill fields like the summary, description, assignee, and more. This gives you more control over the new sub-task's initial setup.

Here's how you can configure the automation rule:

Automation Rule Configuration

  1. Trigger:

    • Event: Issue transitioned
    • Status: Integration
  2. Condition:

    • Condition: Issue fields condition
    • Field: Issue Type
    • Operator: equals
    • Value: Task (Or whatever your parent issue type is called)
  3. Action:

    • Action: Create sub-tasks
    • Configuration:
      • Issue Type: Sub-task
      • Parent Issue: {{issue.key}}
      • Summary: Back-end
      • Other fields: Customise as needed.

This rule will trigger whenever a Task transitions to "Integration". The condition ensures that a new "Back-end" sub-task is only created for parent tasks of that type.

Give this a try and let me know if you have any questions!

AkLike August 8, 2024

Your rule will only work if the main task (which has subtasks) is transferred to the status I need, right?

But I need to transfer the status in the subtask and have it cloned

AkLike August 8, 2024

Try to explain it again. There is a task, it has subtasks. I need to transfer the status of a Subtask to, say, "In progress", and under this condition, the subtask for which I changed the status should be cloned there, with the same parameters and data. By changing only the task type field.

AkLike August 8, 2024

The error that I have is:

Parent issue ID: '15682' / Key: 'SPM-172' can not be sub-task. (issuetype)

AkLike August 8, 2024

Thank you for taking the time to solve my problem! All the best to you

Like Seon Shakespeare likes this
Seon Shakespeare
Community Champion
August 8, 2024

You're very welcome! Glad my suggestions could help point you in the right direction

TAGS
AUG Leaders

Atlassian Community Events