Can't find issue to link to an alert
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
When using alerts in Operations, sometimes it is required to link issues (incidents, for example) that are known to be related to that specific alert. In some cases, when searching for a specific issue, it won't appear as a selectable option even when you are certain that the issue exists in your projects.
Cause
Some issues are not displayed as an option due to the search JQL used in the "Linked Issues" field. This is the query being used:
project in projectsWhereUserHasPermission("Link Issues") AND (resolution = Unresolved or statusCategory != Done) ORDER BY priority DESC, updated DESC
As we can see, it filters issues from projects where the current user has permission to link issues and only unresolved (the "Resolution" field is empty) or issues in a status category other than "Done" (green colored statuses).
Solution
If it is required to link an issue to an alert, be sure you have permission to link issues in that issue's project and that the issue is not "Closed". A workaround to link a "Closed" issue would be either clearing the "Resolution" field or transitioning the issue to one status in the "In progress" (blue colored") or "To do" (gray colored) status categories. Once the issue is linked, you can revert the "Resolution" or "Status" fields changes, and the issue will keep linked.