Set the Sort By Widget Parameter
The primary way to control sorting is through the Sort By widget parameter on the Gantt widget:- Open your Gantt page in Edit mode.
- In the widget parameter sidebar, locate the Sort By field.
- Enter the Polarion field ID you want to sort by (for example,
id,title,priority, or a custom field ID). - Click Apply to save the change.
id, which sorts work items by their Polarion work item ID.
Configure the Default Sort Order
Administrators can set the system-wide default sort field using configuration properties. This default applies to all new Gantt widgets until overridden at the widget level.Work Items Gantt
Set the default sort field in Administration > Configuration Properties:Plans Gantt
For Plans Gantt widgets, the sort parameter also defaults toid:
Sort Children by ID
By default, child work items follow the sort order defined by the Sort By parameter. To force child items to always sort by their work item ID regardless of the parent-level sort, set the following configuration property:false.
| Configuration Property | Purpose | Default |
|---|---|---|
nextedy.gantt.workitems.default.sort_by | Default sort field for Work Items Gantt | id |
nextedy.gantt.plans.default.sort_by | Default sort field for Plans Gantt | id |
nextedy.gantt.sort_children_by_id | Force child items to sort by ID | false |
Verification
After changing the Sort By parameter, you should now see:- Work items reordered according to the specified field value.
- Child items following the parent-level sort order (or sorted by ID if
nextedy.gantt.sort_children_by_idistrue). - The sort order persisting across page reloads.
See Also
- Use Gantt Filters
- Use Dynamic Queries with Page Parameters
- Configure Grid Columns
- Configure Page Parameters
Sources
Sources
KB ArticlesSupport TicketsSource Code
prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/PlansGanttWidget.javaprod-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/web/CustomFieldServlet.javaprod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/GanttFilterByResourceMarker.cy.tsprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/impl/PlannedInFieldFilter.java