This seems to be one of the most ridiculous problems I have ever encountered. How can it even be hard (let alone impossible) to find all issues related to a specific EPIC without making the ugliest query ever?!
In order to find the epic issue (including its subtasks) along with its epic linked issues and their respective subtasks, I seem to have two alternatives:
Alternative 1
issue = PROJ-1234 OR parent = PROJ-1234 OR "Epic Link" = PROJ-1234 OR issueFunction in subtasksOf("\"Epic Link\"=PROJ-1234")
Alternative 2 (which sucks since this query will also return issues that are linked using other link types)
issue = PROJ-1234 OR issueFunction in linkedIssuesOfAllRecursiveLimited("issue = PROJ-1234", 2)
I have gone through every forum thread imaginable and I don't understand why for example "parentEpic" or tempoEpicIssues() doesn't work. I think the former is not available for JIRA server and the latter you need developer permissions for.