Rule triggered by another rule
Asked by Dailet:

I want to create an automation to transition (unblock) issues when their blocker issue gets Done/Closed.

* For context, I have an issue that is blocking other issues (linkedType is blocks --\> Issue A **blocks** Issue B).
* When Issue A status is transitioned to **Done** I need to unblock Issue B, meaning I need Issue B to transition from **Blocked** to **To Do**.
* Issue A and B are related by a link type named "blocks" when seeing it from Issue A and named "is blocked by" when seeing it from Issue B
  * Issue A **blocks** Issue B
  * Issue B **is blocked by** Issue A

How can I do that with automation?

I was hoping I could use the ***Related issues condition***, but I'm approaching this from the triggering issue's perspective and I'm not able to transition the linked issues.

![2024-07-17_164459.jpg](/t5/image/serverpage/image-id/336183iFEFEEA267B779380/image-size/large?v=v2&px=999 "2024-07-17_164459.jpg")  

I'm not able to figure out a way to run this rule from the linked issues perspective bc all I can think of as a solution would be to create a rule that will trigger another rule. Rule 1 will be triggered by Issue A's transition and then that rule would trigger Rule 2 that will use the ***Related issues condition*** in the other direction, it will search for all Blocked issues where link type is "blocks", but even so, how will store the triggering issue.key from Rule 1?!  
I need help!! ?


Answers:
author: Trudy Claspill
body: Hello [@Dailet](/t5/user/viewprofilepage/user-id/5520283)

Are the blocking issue and the blocked issue in the same project?

This rule should work for you. Adjust the status values I've used to match your needs.

The rule is triggered when an issue transitions to Done.

It starts a branch to look for any issues linked to it with the "blocks" link.

For each of those linked issues it checks if the issue's current status is (I used Pending, in your case it would be Blocked).

If the current status of the linked issue is Pending (Blocked) then it transitions the linked issue to To Do.

![Screenshot 2024-07-17 at 3.14.09?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/336195iFCEEA197C341545E/image-size/large?v=v2&px=999 "Screenshot 2024-07-17 at 3.14.09?PM.png")

If the blocking and blocked issues are in different projects the rule is just slightly more complicated.

comments: author: Bill Sheboy
body: Hi [@Dailet](/t5/user/viewprofilepage/user-id/5520283)

*Yes, and*...to Trudy's suggestions...

You describe this scenario:

GIVEN Issue A --blocks--\>Issue B with issue linking  
AND Issue B is in the *Blocked* status  
WHEN Issue A transitions to *Done*   
THEN transition Issue B to *To Do*

Can Issue B be blocked by more than one issue, such as:

Issue A --blocks--\> Issue B  
Issue C --blocks--\> Issue B

If so, what do you want to do: transition Issue B regardless or leave it as is?

When the rule needs to account for all possible blocking issues to Issue B, I believe the rule will need an additional Related Issues Condition inside the branch to check for those issues before transitioning Issue B.

Kind regards,  
Bill


author: Dailet
body: [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) you're spot on... I can have multiple issues blocking Issue B... so, Issue B should remain BLOCKED until all the blocker issues are Done.


author: Bill Sheboy
body: Thanks for confirming that! Please try adding the additional condition inside the branch...ensuring you exclude the one you want to move if it is the only one. (e.g., Issue B) If the remaining count is zero, the transition can happen.


Tags: cloud

jira-cloud