Hello Atlassian Community,
I hope you're all doing well. I'm currently working on a Jira Cloud project with a hierarchical structure where Epics contain Stories, and Stories contain Tasks.
What I'm trying to achieve is an automated workflow that, when a Task's status is set to "Failed," the corresponding Story under the same Epic should also be moved to a "Failed" status.
I've explored Jira Automation, but I'm not quite sure how to set up this specific rule. Can someone please provide guidance or steps on how to achieve this automation?
Your assistance would be greatly appreciated.
Thank you!
[Saraswathi. K]
---
Feel free to copy and paste this into your Atlassian Community post, and you should receive feedback and guidance from the Jira experts and community members.
Hello @Saraswathikotala
How do you know which Story corresponds to the failed Task?
That information is necessary for us to guide you in creation of the automation rule.
@Trudy Claspill thanks for Your reply.
For example Epic-1, under epic we have story-2, under story u have a task- 2.1. task-2.2, task-2.3, if task 2.3 is failed aromatically story-2 and epic-1 need to move to failed status.
please help me on this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the Jira issue hierarchy the built in Story and Task issue types are at the same level. Tasks can't be created as children of Stories. Only Sub-task type issues can be children of Stories, Tasks, and other issue types at that same level.
Can you provide a screen image of a Story showing the Tasks that are "under" it?
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.
Thank you for those images. Based on that information you are using the generic issue linking functionality to create the relationship between the Task and the Story.
Can you now provide an image from the Issue Linking page? Access that by clicking on the gear icon near your avatar, then selecting Issues. In the new screen select the Issue Linking option from the navigation panel on the left. The screen I want to see looks something like this:
Is a Task every linked to more than one Story?
Is a Story ever linked to more than one Epic?
Also, I have two related questions for you. Is there a reason you are using generic issue linking to relate the Story issues to the Epic instead of making the Story issues children of the Epic? And, is there a reason that you are using Tasks instead of using Sub-tasks?
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.
Is a Task every linked to more than one Story?
Ans: No
Is a Story ever linked to more than one Epic?
Ans: story i linked one epic only
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, thank you, that is the screen I wanted to see.
Lastly I need the answers to these questions:
Is a Task every linked to more than one Story?
Is a Story ever linked to more than one Epic?
Also, I have two related questions for you. Is there a reason you are using generic issue linking to relate the Story issues to the Epic instead of making the Story issues children of the Epic? And, is there a reason that you are using Tasks instead of using Sub-tasks? I don't need the answers to these questions, but I am curious about the reasoning behind your choices.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If i created story under sub-task shall i get the automation rule. can you pls confirm me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jira's default issue hierarchy is
Epic (level 1)
|-- standard issues types (i.e. Story, Task, Bug) (level 0)
|-- sub-task issue types (level -1)
Jira automatically recognizes a parent/child relationship between these issue when the "standard issue type" issues are added as children of an Epic. And Sub-tasks can be created only as children under a standard issue type.
With your current set up you can still construct an automation rule that will work. If your Task ends up linked to more than one Story, or your Story to more than one Epic, then all Stories linked to a failed Task will be updated and all Epics linked to a Failed Story would be updated.
You will need two rules.
Rule 1: when Task fails, update linked Stories to Failed
Rule 2: when Story fails, updated linked Epics to Failed
RULE 1
TRIGGER: Issue transitioned
Destination status: Failed
CONDITION: Issue Fields Condition
Field: Issue Type
Condition: equals
Value: Task
FOR EACH: Branch Rule/Related issues
Type of related issue: Linked issue
Link Type: Links To
CONDITION: Issue Fields Condition
Field: Issue Type
Condition: equals
Value: Story
ACTION: Transition issue
Destination status: Failed
In my example below I used Cancelled instead of Failed because I don't have a Failed status in my instance.
For Rule 2 you would use the same structure, but in the first Condition you would use Story instead of Task, and in the second Condition you would use Epic instead of Story.
Additionally in Rule 2 you would need to check this box on the Rule Details page:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill Thank you so much dear.
one more question i have created can you help on below one it is helpful for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If my suggestions have lead you to a working solution, please consider marking my Answer as Accepted.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.