The JQL Filter generator allows you to limit the scope of your structure by removing any issues that do not pass certain criteria.

Any ancestors (parents, grandparents, etc.) to issues that pass the filter will also remain in the structure, in order to preserve the structure's hierarchy. In this example, the filter removed all assigned issues, except Epic 2. Because Epic 2 is the parent of Story 4 and Story 6 (both unassigned), it needs to remain.
Placement matters. Generators only affect issues beneath them, so if you want to filter the entire structure, place the generator at the very top (by selecting the structure's name in the top row). If you place it anywhere else, it will only filter the items beneath it.
Configuring a Filter
When setting filters, you can select certain options to customize which issues wind up in your structure.

Runs As
When a generator runs, it runs as the structure owner. This is important because the generator will have access to the same projects, issues, etc. as the user listed here – if they don’t have permission to view an issue, it won’t be added to the structure.
JQL
Enter the appropriate JQL query. Issues that pass this query will remain in the structure.
When entering a JQL query, auto-complete will suggest fields, operators and values as you type. It will also check that the JQL query is valid:
a green checkmark icon will appear if the query is valid
a red exclamation icon will appear if the query is invalid
Keep non-issues
When checked, non-issue items, such as folders, will remain in your structure regardless of whether or not they match your filter criteria.
Show all sub-items of matching items
If this option is selected, all issues that match your filter criteria will be included in the structure, along with any sub-items of those issues.
Filter on level
You can apply a filter to specific levels within your hierarchy. For example, you may want to include all top-level items, but then filter the stories beneath them. See Generator Scope to learn more about customizing levels.