Prerequisites
- Your Gantt page must be a LiveReport page (page parameters are a LiveReport feature).
- The widget query type must be set to Lucene + Velocity (not pure Lucene).
Step 1: Create Page Parameters
- Open your Gantt LiveReport page in Edit mode.
- Navigate to the page parameter configuration area.
- Add a new page parameter. For example, create a parameter with:
- ID:
department - Type: Enum (or any appropriate type for your use case)
- Label: Department
- ID:
Step 2: Reference Parameters in the Widget Query
In the Gantt widget configuration, set the Query Type to Lucene + Velocity, then enter a query that uses the page parameter value:$pageParameters.department.toLucene() expression converts the selected page parameter value into a valid Lucene query fragment.
Step 3: Use Parameters for Time Range Filtering
Page parameters can also drive the Gantt time range. Createstart and end date parameters, then reference them in Advanced > Gantt Config Script:
start and end with your actual parameter IDs if they differ.
Step 4: Load Parent Items for Filtered Results
When filtering by a page parameter, you may want to display parent items above the filtered work items for context. Use a Page Script to traverse parent links and include them in the query:Common Use Cases
| Use Case | Parameter Type | Query Pattern |
|---|---|---|
| Filter by department | Enum | department.KEY:($pageParameters.department.toLucene()) |
| Filter by team | Enum | team.KEY:($pageParameters.team.toLucene()) |
| Filter by date range | Date | gantt.config.start_date = new Date(...) in Config Script |
| Filter by plan level | Enum | Use page parameter to select which plan to display |
Verification
After configuring dynamic queries, you should now see:- A page parameter dropdown or selector on your LiveReport page.
- Changing the parameter value reloads the Gantt with a filtered set of work items.
- The funnel icon in the footer reflects any time range filter applied via page parameters.
See Also
- Use Gantt Filters
- Configure Page Parameters
- Write Page Scripts with Velocity
- Configure Multiple Plan Levels
Sources
Sources
KB ArticlesSupport TicketsSource Code
prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/pageparams.jsprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/impl/ProjectWorkItemEnumProvider.javaprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/impl/PlannedInFieldFilter.javaprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/impl/web/CustomFieldServlet.javaprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/util/WidgetPropertiesAccess.java