Hello, community!
Issues in my project are linked to various external tools (requirements, etc. Think as something similar to linking a Jira issue to a git commit).
How can I query for issues that meet some criteria for this type of links?.. E.g. counting the links, having 0 or exact 5, maybe get the list of linked items? See attached screenshot.

Scriptrunner "hasLinks()" does not recognize these links, only the 'standard' ones, between 2 issues: is child, epic link, blocks, is blocked an so on. "related test case" is another type of links similar to "tracks requirement" above:

Thank you in advance!
Vasile S.