Can i automate issue status after blocked by issues removed

Aaron Holt September 13, 2023

Hi all, 

I have an automation task that sets Issue A as blocked when Issue B is linked to it as a blocker. 

I also then have a task that removes Issue B as a linked blocker on Issue A when Issue B is marked as DONE. 

But i'm trying to work out how to now change the issue status of Issue A back to 'TO DO' once any blocked issues are removed. It will have to be some sort of recursive check as Issue A could have multiple issues blocking it so those issues will clear at different times. So its only when the final blocked issue is removed, that the status of Issue A should change to 'TO DO'. 

Anyone have any ideas on how to do this? Been struggling with this for a day or two now. 

thanks 

2 answers

0 votes
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.
September 14, 2023

Hi @Aaron Holt 

First thing, are you using "blocked" as a status and as a link type?  If so, I recommend not using a "blocked" status, and instead using the built-in Flag feature to indicate blocking.  I find when teams add a status for that condition (i.e., blocked) it becomes a normal part of their flow rather than an exception.  And so they are less likely to mitigate or eliminate future blocks of the same type.

Back to your question, there are a couple of ways to do this in a rule: you could use a related-issues condition with JQL to find the absence of other blocking issues or use a lookup issues action with JQL to test the same thing.  I recommend using lookup issues as you have both more control over its behavior, and I have seen the related-issues condition return incorrect results.

Kind regards,
Bill

Aaron Holt September 16, 2023

thanks for the reply. I've not worked much with JQL queries so i've created a bit of a hybrid automation using flags and blocked status. 

Like Bill Sheboy likes this
0 votes
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 14, 2023

Hi @Aaron Holt , welcome to the community and thanks for your question.

We are doing something a little bit like this when the parent issue from the branch is transitioned into a Done state only when all of the child issues are in a Done state.

image.png

image.png

 

For me, anyway, the breakthrough moment was the insertion of the 're-fetch the issue data'. How this works is that, when something goes into Done, the data is re-checked and now if the parent meets the criteria to do into Done, in this case, if all the children match the JQL query, then the parent issue is transitioned to Done. You could do something similar from the rule that is running for the blocking issue, when it removed, you could recheck the blocked issue if it doesn't have any more linked issues of blocking to put it into the To Do state.

I hope this helps but if not, please give us your feedback and either I or someone else will try to help.

Cheers

Aaron Holt September 14, 2023

Thanks for that. I've sort of worked out what the issue is. If i set up an automation rule that changed the status of Issue A to 'TO DO' when a blocking linked issue is deleted, then this works if the linked issue is manually removed from Issue A. 

What doesn't work is when the an automated rule removes the linked issue from Issue A, as for some reason, it doesn't see that as 'Issue link deleted', even though the automation does remove the link. As iI said, I have tested this by manually removing the linked issue and the status changed as expected. 

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.
September 16, 2023

Do you have two different rules in your scenario?

If so, that actions one rule performs cannot, by default, trigger other rules.  This is intentional to prevent a run-away rule execution problem.

When you intentionally want one rule's actions to trigger another, go to the "downstream" rule that will be triggered, view the rule details at the top, and enable the option to "Allow rule trigger".

Dana Pliavinska April 5, 2024

@Aaron Holt Could you please share screens of your rule? I need to create an automation rule that sets Issue A as blocked when Issue B is linked to it as a blocker and I have issues with that task((

izabela_doniec
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 20, 2024

@Dana Pliavinska please check here

Suggest an answer

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

Atlassian Community Events