Currently I am using this JQL query (in combination with Scriptrunner) to get issues that are linked to other issues using the link type "depends on":
issueFunction in linkedIssuesOf("statusCategory!=Done", "depends on")
This also finds issues where the link is between issues of the same project. What I am looking for is a way to only find issues with depends on links, that link to an issue of another project, without explicitly having to name the project keys in the query (since they can change all the time). My goal is to find out/visualize cross team dependencies.