If when running a query similar to below you get an error stating that the hasLinks() function cannot be found.
This is because inside of ScriptRunner for Jira Cloud the hasLinks function is a JQL keyword as described in the documentation page http://scriptrunner-docs.connect.adaptavist.com/jiracloud/jql-aliases.html#_haslinks.
As it is a JQL Alias you do not provide the issueFunction in part of it and the documentation page above shows how to run a query using the hasLinks JQL Alias inside of Jira Cloud.
An exampe of how to use the hasLinks function is shown below for reference purposes.
We can also confirm that you can see more detailed information on the differences between the cloud and server versions inside of our documentation page located here .