Skip to main content

Set the Sort By Widget Parameter

The primary way to control sorting is through the Sort By widget parameter on the Gantt widget:
  1. Open your Gantt page in Edit mode.
  2. In the widget parameter sidebar, locate the Sort By field.
  3. Enter the Polarion field ID you want to sort by (for example, id, title, priority, or a custom field ID).
  4. 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.

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:
nextedy.gantt.workitems.default.sort_by=id

Plans Gantt

For Plans Gantt widgets, the sort parameter also defaults to id:
nextedy.gantt.plans.default.sort_by=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:
nextedy.gantt.sort_children_by_id=true
The default value is false.
Configuration PropertyPurposeDefault
nextedy.gantt.workitems.default.sort_byDefault sort field for Work Items Ganttid
nextedy.gantt.plans.default.sort_byDefault sort field for Plans Ganttid
nextedy.gantt.sort_children_by_idForce child items to sort by IDfalse
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

KB ArticlesSupport TicketsSource Code
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/PlansGanttWidget.java
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/impl/ProjectWorkItemEnumProvider.java
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/impl/web/CustomFieldServlet.java
  • prod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/GanttFilterByResourceMarker.cy.ts
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/impl/PlannedInFieldFilter.java