-
Type:
Suggestion
-
Resolution: Unresolved
-
None
-
Component/s: General
-
None
Problem
Sourcetree appears to treat pull request IDs as text when sorting the pull request list. This produces a lexicographical order such as:
#1, #10, #100, #101, #11, #12, #2
This makes it unnecessarily difficult to locate a specific or recently created pull request, particularly in repositories containing a large number of PRs.
Expected behavior
Pull request IDs should be sorted using natural/numerical ordering:
#1, #2, #10, #11, #12, #100, #101
Ideally, users should also be able to switch between ascending and descending numerical order. Descending order would make the newest pull requests easier to find.
Additional context
Pull request IDs are generated by the repository hosting service, so users cannot add leading zeros to make alphabetical sorting work correctly. Opening the repository’s web interface is a possible workaround, but it interrupts the Sourcetree workflow.
Sourcetree already supports similar natural sorting for tags following SRCTREEWIN-1308, so it would make sense to apply equivalent sorting logic to pull request IDs.
The issue was originally raised in this Community question:
https://community.atlassian.com/forums/Sourcetree-questions/Sourcetree-Numerical-Sort/qaq-p/3279215