Forums

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

Automation to Transition an issue to "To Do" once all "is Blocked by" linked issues are "Complete".

Hi There

I am struggling to build an Automation to Transition an issue to "To Do" once all "is Blocked by" linked issues are "Complete".

I read somewhere in the community that issue in (linkedIssues(ACQ-1032) and issueLinkType = "is blocked by") will provide both inbound and outbound "is blocked by" counts, hence why I am getting a count of 3 and not one. 

The question is, how do I filter it to count inbound or outbound? It seems af if this should be a common use case. I am sure there must be a workaround.

(linkedIssues(ACQ-1032) and issueLinkType = "is blocked by" and issueLinkType != "blocks") does not work, it returns 0.

Any ideas?

Trigger

Trigger Issue.png

Assessed Linked Issue

Assessed Linked Issue.png

Automation

Automation 1.png

Automation 2.png

Problem

Problem.png

Problem 2.png

1 answer

1 accepted

0 votes
Answer accepted
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.
February 6, 2024

Hi @van den Bergh, Marius, Vodacom (External) 

You may distinguish the inbound and outbound using the link types, depending on your rule structure and use of JQL or other actions.  To validate these, I recommend first creating JQL outside the rule with an example issue and the issue search; once your JQL works as expected use it in the rule...with modifications for smart values.

I note your rule has a hardcoded value for the issue key in the lookup issues action.  Is that what you intended to do?

Kind regards,
Bill

Hi Bill

Yes, the hardcoded value is intentional. I am using it as an example issue. Once the automation is working, it will be changed to a smart value.

As for the JQL outside the automation, I have been trying this many times, I cannot seem to get a working JQL.

The JQL in question is:

issue in linkedIssues(ACQ-1032) and issueLinkType = "is blocked by"

It returns 3 x issues (1031, 1033, 1034). This represents both the "Blocks" and "is blocked by" link types for ACQ-1032. I am expecting only the "is blocked by" link type to be returned.

Any ideas on the JQL edit I need to make so that only the "is blocked by" type is returned? That would be one issue (1031) in this case.

Regards

Marius

(issue in linkedIssues(ACQ-1032) and issueLinkType = "is blocked by") and (issue in linkedIssues(ACQ-1032) and issueLinkType = blocks) returns the exact same results.

 

(issue in linkedIssues(ACQ-1032) and issueLinkType = "is blocked by" and issueLinkType != blocks) returns nothing.

 

The target return result is ACQ-1031 only for it is the only link of type "is blocked by" for ACQ-1032

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.
February 7, 2024

Have you tried using the Related Issues condition, rather than using all of the extra rule steps?

That condition could check for linked issues, of a specific type, and which meet certain criteria, such as "all match specified JQL".  And that JQL could check for issues which are completed.

Screenshot 2024-02-07 084916.png

 

And there it is, works perfectly. Much appreciated Bill!

So simple, yet I did not see it. :-(

It still begs the question as to why the above JQL does not work, but I am happiness for now.

pic4.png

Like • Bill Sheboy 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.
February 8, 2024

Awesome; I am glad to learn that helped.

For that JQL, I suspect the challenge is still the direction of links.  That complexity is abstracted away when using the Related Issues Condition, without the need to specifically check inward vs. outward and type of links.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, dance, gamification, badge, razzle dazzle, team '25 anaheim

Earn a one-day badge today and do the Atlazzle Dazzle! 🕺

Today only! Share what you’re the most excited about for Team ‘25 or just dance out the beginning of a new quarter with us.

Comment the post
AUG Leaders

Atlassian Community Events