feat(blocked): exclude pinned issues from bd blocked output
- Add Pinned field to Issue struct in types.go - Create migration 023 to add pinned column with partial index - Update SQLite GetBlockedIssues to filter WHERE pinned = 0 - Update Memory GetBlockedIssues to skip pinned issues - Update schema.go with pinned column definition Pinned issues are tracked but excluded from the blocked list to reduce noise for issues that are intentionally parked. Closes: beads-ei4 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -252,11 +252,13 @@ func (s *SQLiteStorage) GetStaleIssues(ctx context.Context, filter types.StaleFi
|
||||
}
|
||||
|
||||
// GetBlockedIssues returns issues that are blocked by dependencies or have status=blocked
|
||||
// Note: Pinned issues are excluded from the output (beads-ei4)
|
||||
func (s *SQLiteStorage) GetBlockedIssues(ctx context.Context) ([]*types.BlockedIssue, error) {
|
||||
// Use UNION to combine:
|
||||
// 1. Issues with open/in_progress/blocked status that have dependency blockers
|
||||
// 2. Issues with status=blocked (even if they have no dependency blockers)
|
||||
// Use GROUP_CONCAT to get all blocker IDs in a single query (no N+1)
|
||||
// Exclude pinned issues (beads-ei4)
|
||||
rows, err := s.db.QueryContext(ctx, `
|
||||
SELECT
|
||||
i.id, i.title, i.description, i.design, i.acceptance_criteria, i.notes,
|
||||
@@ -273,6 +275,7 @@ func (s *SQLiteStorage) GetBlockedIssues(ctx context.Context) ([]*types.BlockedI
|
||||
AND blocker.status IN ('open', 'in_progress', 'blocked')
|
||||
)
|
||||
WHERE i.status IN ('open', 'in_progress', 'blocked')
|
||||
AND i.pinned = 0
|
||||
AND (
|
||||
i.status = 'blocked'
|
||||
OR EXISTS (
|
||||
|
||||
Reference in New Issue
Block a user