Automation For Jira - The audit log is showing the message "No related issues could be found"

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

When configuring a rule with Automation for Jira, it is possible to add a Branch rule component to perform some action against related issues, as explained in this documentation. Depending on how the rule is configured and on the issue that triggered the rule, the Branch might not any related issue and the message "No related issues could be found" will be shown in the audit logs, as illustrated in the screenshot below below:

No related issues could be found

The purpose of this article is to list the most common reasons why no issue is found in the branch, and how to address each of them.

Diagnosis

Diagnosis for Root Cause 1

  • Check how the rule scope is configured via the Rule Details page (in the example below, only the SCRUM project is included):

    Rule scope

  • For the issues that you were expecting to be found by the branch, check the project they belong to

  • If they belong to a different project, then this root cause is relevant

Diagnosis for Root Cause 2

  • Log into Jira as the rule actor

  • Go to the Jira issue search page, and Copy/paste the JQL query from the rule, and also append AND Project = (Project 1, Project 2...) at the end of the query (if the rule has specific projects configured in its scope). For example:

    JQL Query

  • If no issue is returned by this query, then this root cause is relevant

Diagnosis for Root Cause 3

To check if this root cause is relevant, please check the section Root Cause 3, which describes this scenario along with an example that illustrates it.

Cause

Root Cause 1

When using the Branch rule component along with any of the option below, this component might not find any Jira issue if the related issues are from a project that is not included in the rule scope

  • Epic (parent)

  • JQL query

  • Stories

  • Linked issues

  • Destination issue

  • Issues fixed in version

  • Issues in the sprint

Root Cause 2

When using a JQL query in the Branch rule component, the automation rule will execute the JQL query again the rule actor (and also append Project = (Project 1, Project 2...) depending on the rule scope). The JQL query might not return any result for this result for various reasons:

  • There are no issues that match the JQL query

  • There are issues that match the JQL query, but the rule actor does not have the permission to see them

    • This could be due to how the Browse Projects permission is configured in the project(s) the issues belong to

    • Or this could be because the issues have a Security Level set, and the rule actor is not allowed to see them because of this Security Level

Root Cause 3

By design, the branch does not include the issue that triggered the rule. As a result, if the branch is configured in a way that only the trigger issue will be "found" by it, the branch will not return any issue.

Let's take the example below:

  • The Branch is configured with the JQL query below:

    Screen 1

  • When testing the JQL query, 1 issue is returned by the query:

    Screen 2

  • If the rule was triggered by the only 1 issue returned by the JQL query (SCRUM-125 in this example), the branch will reject it and will not find any issue as shown below:

    Screen 3

Solution

Solution for Root Cause 1

To fix this issue, you will need to either add more projects to the rule scope, or make the rule global.

Please note that the rule scope can only be edited in the Global Administration page of Automation For Jira, so you will need to be a Jira Administrator to do it.

Solution for Root Cause 2

To fix this issue, you might need to check a few things:

  • Is the JQL query correctly built? Is it supposed to return any result?

  • If the query is supposed to return any issue, does the rule actor have the permission to view these issues?

    • This can be verified by using the Permission Helper Tool against this user, the missing issues, and the Browse Projects permission.

Solution for Root Cause 3

There is no solution for this root cause, since the behavior described in the Root Cause 3 section is expected by design.

Updated on August 23, 2024

Still need help?

The Atlassian Community is here for you.