ProjectManager.com uses the Work Breakdown Structure (WBS) to identify and organize tasks within a project. The WBS concept is similar to an outline, and you can sort your tasks according to the outline dictated by the Work Breakdown Structure to view them in the same hierarchy.
Here’s how it works:
A WBS number is an outline-style number with multiple segments, for example, 5.13.27. Each time you indent a task underneath another one, you will add a new segment to the WBS.
Tasks within the WBS are sorted by segment, similar to how semantic versioning numbers are sorted. This means that 1.10 will be after 1.9, and 10.1 will be before 10.2 and after 9.9.
To sort tasks via their Work Breakdown Structure numbers, use the following pseudocode:
If you use one of the ProjectManager SDKs, you can use the built-in sorting functionality of the SDK. Here’s how to sort in the supported languages:
The built-in comparison class WbsSortHelper allows you to sort List<TaskDto> objects directly: