Delete link of an issue if the linked "blocked by" issues are in the status done with automation

Thies Uhlenbruch April 12, 2023

We have several issues in our jira project which have dependencies and I want to automate the behavior of the dependencies under certain conditions. 

For example we have a scenario like this:

1. PUT-1 is blocked by PUT-48 (Open)

2. PUT-2 is blocked by PUT-105 (Open), PUT-105 (Done), PUT-8 (Done)

3. PUT-34 is blocked by PUT-34 (Done), PUT-16 (Done)

... and so on ...

My goal is to check on a daily bases (scheduled) if the blocked by issues (1 to n) are all Done. In that case delete the link to all of them.

So how would I do this with jira automation because I guess that I have to use the lookup action with a branch.

Would be great to hear from you.

Thanks

Thies

 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 12, 2023

Hello @Thies Uhlenbruch 

You could use a Schedule trigger to run the rule. 

However you need to provide or get the list of blocked issues that you will want to check.

With a Schedule trigger you can include a JQL to select the issues you want to operate on. 

Unfortunately Jira doesn't have a native "hasLinksOfLinkType" function. Because of that there is not a dynamic method to get just the issues that have "is blocked by" links to other issues. You will have to either provide an explicit list of issues to check, or use a more generic JQL to retrieve issues to check (i.e. project=X and issueType in (A, B, C)

The next component in the rule would be actually be a Condition for Related Issues rather than a Lookup Action.

Screen Shot 2023-04-12 at 11.23.02 AM.png

This condition will check that all issues linked to the primary issue (retrieved by the schedule trigger) with the "is blocked by" link are in a Done status. If they are, then the next step will execute. If they are not, or if there are no linked issues with that link type, then the next step will not execute and the rule will iterate to the next issue in the list retrieved by the schedule trigger.

The next step would be a Delete Links action to delete the l"is blocked by" issue links.

Screen Shot 2023-04-12 at 11.26.41 AM.png

Kelly Arrey
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.
April 13, 2023

Hi @Trudy Claspill would `issueLinkType = "is blocked by"` work in this context?

Here's the doc: https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-fields/#Issue-link-type

Like Trudy Claspill likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 13, 2023

You're right @Kelly Arrey ! I thought there was something like that but was looking in the functions reference instead of the fields reference. Good catch! That would indeed work in the schedule trigger for selecting the issues to run the rule against.

Kelly Arrey
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.
April 13, 2023

I know what you mean @Trudy Claspill, I wish all that documentation was on a single page so you could search it once instead of having to search each page individually.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023

Hello @Thies Uhlenbruch 

Did the answers we provided help you resolve your issue? If so, please consider marking the Answer as Accepted, to help other users find posts with validated answers/solutions.

Thies Uhlenbruch April 20, 2023

Hey @Trudy Claspill ,

that works very well. Thank you for your support :-)

 

Cheers

Thies

Like Trudy Claspill likes this
fwef wefwef
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 6, 2023

I've another question regarding this topic.

 

How to check, if there is still a link to a NOT deleted issue with type XY? 

 

issueLinkType = "XY" is working, but it still get's a hit, if there is a link to a deleted issue! You can't see the link, but I think it's still there!

 

Thanks a lot!

Suggest an answer

Log in or Sign up to answer