Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation to add flag when issue is blocked by a ticket not in Done status

Darren Mason June 13, 2023

Hello,

Can someone help me with creating an automation rule for the following please:

I want to add a Flag (Impediment) to any issues in a future sprint that is 'Blocked By' an issues with an Open status. I.e. clearly alert users that a ticket needs to be unblocked for an up-coming sprint

I believe the above is doable by using the "When: Issue linked" and Type 'Blocks' but the tricky part is I want to run it on all existing issues in a Project and not just for subsequent issues where the Blocked by link is created.

Any ideas? As I am using the "When: Issue linked" trigger, I cannot replace that with a Schedule trigger

1 answer

0 votes
John Funk
Community Champion
June 13, 2023

Hi Darren - Welcome to the Atlassian Community!

You can copy the current one based on the When Issue Linked trigger and change the trigger for the new one to a Scheduled trigger to run for the existing ones. But make sure your first rule is working as intended before you copy it. 

Darren Mason June 13, 2023

It fails if I do that as it doesn't have the source issue as its within the "When: Issue linked" trigger

John Funk
Community Champion
June 13, 2023

Add JQL to the scheduled trigger part to make sure there are linked issues and the issue is not Done. 

Darren Mason June 13, 2023

I don't think JQL can go look/check a Linked Issue and check its status, it can only look at the filtered issues unless you know a way it can?

John Funk
Community Champion
June 13, 2023

Yeah, you would need ScriptRunner for that. 

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.
June 13, 2023

Hi @Darren Mason and @John Funk 

Another approach for your scheduled trigger rule to flag the earlier issues is...

  • trigger: scheduled with JQL to find any issues left to update (i.e., meet your criteria and are not yet flagged)
  • action: lookup issues on more JQL to find any of the predecessors creating blocks
  • advanced compare condition: check if the lookup has any issues
  • action: flag the current (trigger) issue (as the scheduled trigger allows you to iterate over them)

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events