feat: advanced issue search with custom field filters #496
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add the ability to filter issues by custom field values in the issue list. Users should be able to narrow issues by any org-level issue-scoped custom field (e.g. filter by Priority=High, Status=Pending Testing).
Implementation
1. Database Layer
CustomFieldFilters map[int64]stringtoIssuesOptionsstruct inmodels/issues/issue_search.goapplyCustomFieldCondition()that JOINscustom_field_valuetable (one JOIN per filtered field, AND semantics)2. Indexer Options
CustomFieldFilters map[int64]stringtoSearchOptionsinmodules/indexer/issues/internal/model.goToDBOptions()to pass through3. Web Handler
cf_{fieldID}={value}query parameters inprepareIssueFilterAndList()4. Filter UI
templates/repo/issue/filter_list.tmplQueryBuildto maintain filter state across page navigation5. API
cf_{fieldID}={value}query parameters inListIssuesandSearchIssuesCustomFieldFiltersmapDependencies
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com