JQL supports querying issues out of the box, but there is often cases where more complex queries are required. Being able to write JQL functions through Forge will help bring a new level flexibility to developers and teams.
A user wants to write some JQL which checks for issues where the epic link is one of the epics in a project. A developer in the team is comfortable writing Forge apps and would like to write a JQL Function epicsInProject() to complete the JQL
issuetype = Story and "Epic Link" in epicsInProject("Project X")