Fix bd gate list: Separate closed gates into own section
Previously, displayGates() always showed 'Open Gates' header even when closed gates were included via --all flag. Also, closed gates would appear mixed with open gates under the misleading 'Open Gates' header. Changes: - Modified displayGates() to accept showAll parameter - Separates gates into 'Open Gates' and 'Closed Gates' sections - Closed gates only shown when --all flag is used - Fixed handleGateList RPC handler to use ExcludeStatus instead of Status filter for consistency with CLI behavior Fixes gas-town issue go-47m
This commit is contained in:
@@ -2108,9 +2108,9 @@ func (s *Server) handleGateList(req *Request) Response {
|
||||
filter := types.IssueFilter{
|
||||
IssueType: &gateType,
|
||||
}
|
||||
// By default, exclude closed gates (consistent with CLI behavior)
|
||||
if !args.All {
|
||||
openStatus := types.StatusOpen
|
||||
filter.Status = &openStatus
|
||||
filter.ExcludeStatus = []types.Status{types.StatusClosed}
|
||||
}
|
||||
|
||||
gates, err := store.SearchIssues(ctx, "", filter)
|
||||
|
||||
Reference in New Issue
Block a user