How to unflag an issue when it's not blocked anymore?

Nils Medina
Contributor
November 15, 2024

I want my automation to:

  1. flag an issue when it's blocked by another issue
  2. unflag when it's not blocked anymore

To cover these cases, I've created some automations that work for some cases:

  • When blocking issue is added → Flag blocked issue
  • When blocking issue is resolved → Unflag blocked issue

However the issue doesn't get unflagged when all blocking issue are unlinked. I tried this automation but it doesn't work for some reason.

image.png

Questions:

  • What's wrong with the rule above?
  • Is there an easier way to achieve my goal? (vs creating multiple rules to cover all cases)

1 answer

1 accepted

0 votes
Answer accepted
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2024

HI @Nils Medina 

Try the following automation, set blocks or is blocked by to your need

Screenshot 2024-11-15 at 11.20.53.png

Nils Medina
Contributor
November 15, 2024

@Marc - Devoteam that did not work.

Interestingly I just checked the audit log and it marks the automation as working in my tests:

audit.png

 

So I thought maybe the issue comes from the action, not the trigger. I added a simple label edit to the rule to validate this assumption, but still nothing happens :/

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2024

Hi @Nils Medina 

Did the issue the rule actioned on hade a flag set?

Or does the linked issue, has the flag set?

Or if the current issue has a flag, does the current issue have more linked issues with "is blocked by" and or "blocks"?

Like Nils Medina likes this
Nils Medina
Contributor
November 15, 2024

@Marc - Devoteam Ah interesting your second question made me realise that the linked issue is the one that gets unflagged! How should I change the rule so that the blocked issue gets updated? I'm a bit confused by what "current issue" target means :/

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2024

Hi @Nils Medina 

On which issue are you removing the links, based on that the if in the branch should act?

Try in the branch to remove the option "Blocks"

This will mean that the issue you act on should have a link or links that are set as "Blocks"

The issue is that its tricky to do this based on the link direction and on which issue you are actioning

There is always a risk that someone removed the link from the wrong direction and then the flag doesn't get removed or when linking choosing the wrong link direction

Like Nils Medina likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2024

Hi @Nils Medina 

As @Marc - Devoteam describes, rules to handle this scenario can be tricky due to from-which-issue the link was removed...and the directional nature of some types of links.

Even more complexity happens when there can be multiple issues "blocking" of any of the issues involved.  Or the "worser" case scenario: circular, link paths!

 

If you assume no circular, linking paths, and there can be multiple blockings issues for each one, the rule could use branching and related issues conditions:

  • branch to the trigger issue, check if it is "flagged", check if there are any remaining "blocking" issues for it, and if not...only then remove the flag
  • then do the same thing for the destination issue

 

Kind regards,
Bill

Like # people like this
Nils Medina
Contributor
November 15, 2024

Ok progress! So by using the "destination issue", I can now unflag the blocked issue when removing a blocker (from either side).

Untitled.png

The issue is indeed that this still unflag the blocked issue even when there are still other blockers on it...I would assume the condition "if linked issues not present" would catch that?

(Thanks a lot for your help and patience btw, much appreciated 🙏)

Like # people like this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2024

Progress is good to hear!

Remember that some links are directional.  Thus depending upon the direction, the related issues condition may not find matches if the incorrect direction is picked: "blocks" versus "is blocked by".

If the trigger is on "blocks", the branch on the destination issue should probably check the other direction.

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2024

Please accept my answer as a solution.

This will help other community member trying to solve the same.

Nils Medina
Contributor
November 15, 2024

Well, apologies but I haven't reached a solution to my problem yet, as the unflagging should happen only when all blocking issues are removed. Currently it does it everytime.

I don't get why as the condition "if linked issues not present" (issues plural) is checked on the correct issue, aka the one where the action is correctly taken.

Like Marc - Devoteam likes this
Nils Medina
Contributor
November 19, 2024

Ok I think I figured it out. This additional rule unflags the blocked issue, only when no other blocking issues are opened. Tested with multiple blocking issues, and while removing the blocking issue from either side.

Untitled.png

Thanks again @Marc - Devoteam and @Bill Sheboy for your help with this!

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events