Skip to content

Commit 6ee0c24

Browse files
[skip-changelog] Sort board search results with the same name using their platform ID (#2128)
1 parent 074844d commit 6ee0c24

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

commands/board/search.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ func Search(ctx context.Context, req *rpc.BoardSearchRequest) (*rpc.BoardSearchR
103103
}
104104

105105
sort.Slice(res.Boards, func(i, j int) bool {
106-
return res.Boards[i].Name < res.Boards[j].Name
106+
if res.Boards[i].Name != res.Boards[j].Name {
107+
return res.Boards[i].Name < res.Boards[j].Name
108+
}
109+
return res.Boards[i].Platform.Id < res.Boards[j].Platform.Id
107110
})
108111
return res, nil
109112
}

0 commit comments

Comments
 (0)