Configure Default Sort Order
Add a top-levelsortBy array to your risksheet.json containing column IDs in priority sequence:
Sort Descending
Prefix a column ID with~ (tilde) to sort that column in descending order:
Sort by Outline Number
To maintain the same item order as in the Polarion LiveDoc, sort by outline number. Because outline numbers sort lexicographically by default (1.10 before 1.2), you need a server-rendered column that zero-pads each segment.
Step 1 — Add a hidden server-rendered column that formats the outline number:
Interactive Sorting
Users can sort columns at runtime by clicking column headers:- Single click on a column header sorts ascending
- Click again on the same header to switch to descending
- Ctrl+Click (Windows/Linux) or Cmd+Click (macOS) adds the column as a secondary sort criterion without clearing the existing sort
Sorting Behavior by Column Type
Risksheet applies specialized sorting logic automatically based on column type:| Column Type | Sort Behavior |
|---|---|
string, enum | Alphabetical |
int, float | Numeric |
itemLink, taskLink | Alphanumeric work item ID sorting (PROJECT-2 before PROJECT-10) |
multiItemLink | Concatenates all linked item labels, sorts alphabetically |
| Outline number binding | Hierarchical sort (1.2 before 1.10) |
| Nested properties | Sorts by the linked item’s property value, not the link itself |
Sort behavior for custom
serverRender columns depends on the rendered output format. Test sorting after adding server-rendered columns.Comparison Mode Constraints
When comparing to a baseline, Risksheet enforces specific sorting rules:- The grid automatically sorts by Item ID then Revision number — this cannot be overridden
- Task and downstream columns cannot be sorted in comparison mode
- Sorting operates on baseline snapshot values rather than current values (except for system identity fields like
systemItemIdandsystemItemRevision)
Automatic Behaviors
Risksheet handles several sorting details automatically:- Pending edits are saved before sorting occurs — you will not lose unsaved changes when clicking a header
- Client-side execution — sorting, filtering, and pagination happen in the browser without server round-trips, providing immediate visual feedback
- Unsaved items (prefixed with
*) sort with the asterisk intact, keeping newly created items visible
Verify
After configuringsortBy, reload the Risksheet page. The grid should display rows in the specified order on initial load. Click column headers to confirm interactive sorting works and verify that Ctrl/Cmd+Click enables multi-column sorting.
See Also
- Add a Basic Column — column property reference including
idandbinding - Display Sub-Columns — nested column configuration
- Control Column Visibility — show or hide columns
- Create Saved Views — save different column and sort arrangements
Sources
Sources
KB Articles
- -Sort by- parameter
- Enable editing of read-only up-stream columns
- Collect multiple link columns into one column
RiskItemsODataCollectionView.tsSortManager.tsAppConfig.tsPolarionAppConfigManager.javarisksheet.json