Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to Automatically Move Story to "Failed" Status When Task Fails?

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.

1 answer

1 accepted

4 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 27, 2023

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.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 27, 2023

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?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 27, 2023

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:

Screenshot 2023-09-27 at 2.01.25 AM.png

 

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?

@Trudy Claspill  i think this is the one your asking right.Screenshot 2023-09-27 144146.png

@Trudy Claspill 

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 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 27, 2023

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.

@Trudy Claspill 

If i created story under sub-task shall i get the automation rule. can you pls confirm me.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 27, 2023

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.

Screenshot 2023-09-27 at 2.48.58 AM.png

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:

Screenshot 2023-09-27 at 2.52.20 AM.png

Like Bill Sheboy likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 27, 2023

If my suggestions have lead you to a working solution, please consider marking my Answer as Accepted.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events