-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
-
1.11.0
The sort order of branches in the "Branches" view depends on the SCM source that is configured for a project. "git-source.png" and "github-source.png" (see attached screenshots) show the same multibranch project. The only difference is the branch source, which is configured as a Git source and GitHub source respectively.
This is likely due to the fact that in case of a Git source, the branch comparator in BranchContainerImpl breaks, because pipeline.getBranch() always returns null, due to the fact that a Git scm source usually doesn't have an associated ObjectMetadataAction (and no PrimaryInstanceMetadataAction for most branches) while a GitHub source does (see BranchImpl.Branch.getBranch() and Caches.BranchCacheLoader.load(String))