Automation rule| Create multiple Stories on an Epic based on issue transition and create subtasks for one or more story issues automatically

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

This KB article helps with an example rule structure for the below requirement:

Once the Epic status is marked as done, Create 3 stories, and for story 2, create 2 subtasks. The hierarchy should be in this manner: Epic-1 => Status marked Done

  • Create:

    • Story 1

    • Story 2

      • Subtask 1

      • Subtask 2

    • Story 3

Solution

Here is an example structure of automation rule for this requirement:

Trigger:

When Issue transitioned | Done

Action:

a) Create issue: Story in the same project | define summary with desired value | Story1

b) Create issue: Story in the same project | define summary with desired value | Story2

c) Re-fetch issue

d) Create variable: Variable name = X | Smart value : {{createdIssue.key}}

e) Create subtask: Define summary with desired value Subtask1 | Add Parent field and give value in the parent field {{X}}

f) Create subtask: Define summary with desired value Subtask 2 | Add Parent field and give value in the parent field {{X}}

g) Create issue: Story in the same project | define summary with desired value | Story3

Here are the snippets of automation rule for reference:

Create stories and sub-tasks automatically 1
Create stories and subtasks automatically 2

Updated on August 23, 2024

Still need help?

The Atlassian Community is here for you.