I need help setting up a Jira automation rule. Could you please provide step-by-step instructions to achieve the following?
When I create an Epic, I want it to automatically generate Stories and their associated Subtasks. For now, I’m fine with a manual trigger, but eventually, I’d like to fully automate the process so that the following actions occur upon Epic creation:
On Epic creation, the automation should create:
There are a total of 15 Stories, each with their own specific set of Subtasks. It is crucial that the Subtasks are created in the exact order I’ve outlined.
Could you please guide me on how to set up a Jira automation rule to accomplish this?
Hello @Samson S
Welcome to the Atlassian community.
How many subtasks will you need to create in total?
When you say it is crucial that the subtasks be created in the specified order, do you mean ordering just within their parent issue?
What type of Jira subscription do you have? There are limits to how many rule executions you can have per month based on the type of subscription. That could impact our advice about how to structure the rule(s).
Hi , thank you for the response! First time figuring out automation so appreciate the support.
iI have the JIRA premium version. Here's an example , when i create an epic , i should generate :
Story: Onboarding a new client to the system
Story: Deploying a new software feature
I need to have the subtasks in the order specified. I do not have any screenshots of what I have right now as I have been trying dfferent approaches and have deleted the rules with the intention of starting from scratch when I realised I could also ask for some help from the community.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My recommendation would be to create multiple rules.
Rule #1: When the Epic is created
If needed, have a condition to check if this is an Epic where the stories should be created.
Have a Create Issue action for each of the 15 Stories.
In each story add a unique identifier; i.e. a label, or a very unique keyword or code in the summary
Rule #2: When Story is created
Have a condition to check for keyword that matches Story 1
Optionally have an Edit Issue action to edit the story to remove the keyword
Have 1..n Create Issue actions to create the subtasks for Story 1
Rule #3: When Story is created
Have a condition to check for keyword that matches Story 2
Optionally have an Edit Issue action to edit the story to remove the keyword
Have 1..n Create Issue actions to create the subtasks for Story 2
Rules 4 through 16 for the remaining 12 Stories that you created in Rule #1
The reason I recommend this approach is:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Trudy Claspill ! I tried these steps initially with limited tasks but it seems the rule i have tries to attach the subtasks to the epic instead of the relevant story that matches the label.
Here's what I have created :
Rule 1 : to create the stories part of the epic
When issue created
Issue fields condition
- issue type = epic
Then create new issue :
- issue type : story
- summary : story 1
- Parent : trigger issue
- Labels : T1
Then create new issue :
- issue type : story
- summary : story 2
- Parent : trigger issue
- Labels : T2
Rule 2 : create subtask for story 1
When issue created
Refetch issue data
Issue fields condition :
- issue type = story
Issue fields condition :
- labels = T1
Then create a new
- issue type : subtask
- parent issue : current issue
- summary : subtask 1
And create a new
- issue type : subtask
- parent issue : current issue
- summary : subtask 2
And create a new
- issue type : subtask
- parent issue : current issue
- summary : subtask 3
And create a new
- issue type : subtask
- parent issue : current issue
- summary : subtask 4
Outcome : the stories are created for the epic but I do not see any subtasks. Audit log . (ID-266 is the epic)
Action details:
Re-fetch issue data
Issue data re-fetched from server successfully.
Issue condition
The following issues did not match the condition:
ID-266
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Samson S
Is it correct that the audit log output you showed is for rule #2?
This output is correct in that it is triggered by the creation of an issue, in this case the creation of the Epic. And when it says "The following issues did not match the condition" that is also correct because the issue type is Epic and the condition checks that the issue type is Story in Rule #2.
On Rule #2 on the Rule Details page make sure that you check this box:
Since it is a rule that is created the Story issues, this box needs to be checked. That will enable the Subtask creation rule to be triggered by issues that are created through the execution of another rule vs. issues created manually through the UI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works! Thanks @Trudy Claspill . I had not checked the box in rule # 2. Works like a charm now. Appreciate the time you took to resolve this issue . I learned something new today :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Samson S
I know you mentioned about the automation but have you considered using 3rd party app for templating? It can be more user friendly and doesn't require to be familiar with writing any code.
From my side, I'd like to recommend you our solution: Issue Templates for Jira app. On this page: https://deviniti.com/support/product/issue-templates-cloud/ you may find a video recording or clickable tutorial regarding this one, I'm sure you will find it useful!
Klaudia from Deviniti :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Samson S
Whenever you ask for help with an Automation Rule it will help us to help you if you provide:
1. screen images that show your entire rule.
2. screen images showing the details of the step(s) that aren't generating the result you expect.
3.screen images showing the Audit Log details for the rule execution.
4.screen images showing the relevant data in an image that is part of the rule execution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.