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

Any ancestors (parents, grandparents, etc.) to work items 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 work items, 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 work items 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 work items 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, work items, etc. as the user listed here – if they don’t have permission to view a work item, it won’t be added to the structure.
JQL
Enter the appropriate JQL query. Work items 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 checkmark icon will appear if the query is invalid
Keep non-work items
When checked, non-work items, such as flex items, will remain in your structure regardless of whether or not they match your filter criteria.
If this option is not selected, any non-work items, including Flex items, that are added to the structure later will be filtered as well. This may look like the item is simply disappearing - don't panic! To see it again, update the Filter generator settings to keep non-work items.
Show all sub-items of matching items
If this option is selected, the structure will include all work items that match your filter criteria, along with any sub-items of those work items.
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.
Place the generator on
Select where the generator should be placed within the structure hierarchy. This location will be considered "Level 1" when determining which level the grouping is applied to (see "Filter on level" above).
You have three options:
Current level - The generator will be placed on the currently selected level.
Level below - The generator will be placed on the level below the currently selected item.
Top level - The generator will be placed at the top of the structure.
If a level is grayed out, it means the generator cannot be placed on that level.