Hello everyone!
First of all, I'm using scriptrunner in order to get most of the information I need.
Structure
TIP-1 (initiative)
Epic-1
Epic-2
Story
Sub-task
This query returns all the epics that has TIP-1 as a parent link: (not dynamic but that's ok)
issueFunction in hasLinks("is Epic of") AND "Parent Link" = TIP-1
Now let's get into the nitty and gritty 
This query returns all storys, issues and subtasks based on a list of epics:
"Epic Link" in (epic-1,epic2) OR issueFunction in subtasksOf("\"Epic Link\" in (epic1,epic2)")
In the above query, I would like it to return all subtasks,issues,storys etc based on a dynamic list that I get from the first query.
Since the epics in TIP-1 tend to change, some added, some deleted etc, I can't have a static list when getting all the subtasks etc.
Is there anyone out there that can help me out, I'm slowly losing my mind