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.
The default value for the Sort By parameter is id, which sorts work items by their Polarion work item ID.
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 to id:
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:
The default value is 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 |
The Gantt chart does not support manual reordering of items by dragging rows. Sorting is always determined by the configured Sort By field. If you need different sort orders for different views, create separate Gantt pages with different Sort By values.
You can sort by multiple fields by specifying them in the Sort By parameter. The primary sort field takes precedence, with secondary fields used to break ties.
Using the plannedIn field as a secondary sort criterion has known limitations. If you experience unexpected ordering when combining plannedIn with other sort fields, try using plannedIn as the primary sort instead.
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_id is true).
- The sort order persisting across page reloads.
See Also