Forums

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

Create a Jira automation rule for link bug work item under Story, Task or Sub-task

Sandy Hsieh
December 28, 2025

Hi folks,

I’m trying to set up a Jira automation with the following logic:

When a Bug is created, check whether any Story, Task, or Sub-task on the same board has the same label. If a match is found, create a link from the Story/Task/Sub-task to the Bug using Link issue with the link type “causes.”

However, I’m not sure why this automation isn’t working. Could anyone help explain or advise? Thank you!

 

Screenshot 2025-12-28 at 17.56.22.png

1 answer

4 votes
Walter Buggenhout
Community Champion
December 28, 2025

Hi @Sandy Hsieh,

I have been trying to reproduce your scenario, but this wasn't straightforward with only part of your automation rule included in your screenshot.

However, working with the lookup work items action caused me trouble too.

So I simplified the rule and decided to use a related work items / JQL branch instead of the advanced branch based off a smart value like you did:

Screenshot 2025-12-28 at 14.43.29.png 

I tested the above rule successfully in a test environment. Not that I also simplified a couple of things in comparison to your original rule for testing purposes (such as the check on labels). 

Hope this helps!

Sandy Hsieh
December 28, 2025

Hi @Walter Buggenhout 

Thanks so much—it’s working now! Could you share your thought process behind setting up this automation? I’m curious to understand the differences in approach. 🙏🏻

Walter Buggenhout
Community Champion
December 29, 2025

I just started by trying to reproduce your rule more or less in a test environment. Then added a log action component to debug what happened inside your branch to document out that the JQL filter you were using did indeed retrieve multiple work items.

Playing around with this log action showed that the lookup work items action messes up Automation's understanding of what the current and trigger work items are inside a branch. Apparently, I was trying to link a work item to itself with your original approach, which is not working.

The JQL branch literally pulls a list of work items and immediately applies the action(s) inside your branch to that list. Note that there is a maximum of 100 items to be processed this way, but I would imagine this should not be an issue when looking at your use case. Since we're trying to link work items, it is important to control and clearly refer correctly to the original work item that triggered the rule and then each matching item inside your branch.

Like Sandy Hsieh likes this
Sandy Hsieh
December 29, 2025

Noted. Thank you.

Suggest an answer

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

Atlassian Community Events