feat(issues): advanced search with custom field filters #497

Merged
jmiller merged 2 commits from feat/issue-custom-field-search into dev 2026-06-06 04:07:26 +00:00
Owner

Summary

Filter issues by custom field values across the entire search stack — web UI, API, and database.

  • Dropdown filters appear in the issue list sidebar for each org-level issue-scoped custom field with dropdown options
  • URL format: ?cf_{fieldID}={value} — filters persist across pagination and sort changes
  • API: both GET /repos/{owner}/{repo}/issues and GET /repos/issues/search accept cf_ query params
  • AND semantics: specifying multiple custom field filters requires all to match

Test plan

  • Issue list shows custom field filter dropdowns when org has issue-scoped fields
  • Selecting a filter value narrows the issue list correctly
  • Filter state persists when changing sort, page, or other filters
  • Clearing a filter (selecting "All") removes the constraint
  • API: GET /repos/{owner}/{repo}/issues?cf_5=High returns only matching issues
  • Multiple filters: ?cf_5=High&cf_8=Bug returns issues matching both
  • Issues without a value for a filtered field are excluded

Closes #496

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

🤖 Generated with Claude Code

## Summary Filter issues by custom field values across the entire search stack — web UI, API, and database. - Dropdown filters appear in the issue list sidebar for each org-level issue-scoped custom field with dropdown options - URL format: `?cf_{fieldID}={value}` — filters persist across pagination and sort changes - API: both `GET /repos/{owner}/{repo}/issues` and `GET /repos/issues/search` accept `cf_` query params - AND semantics: specifying multiple custom field filters requires all to match ## Test plan - [ ] Issue list shows custom field filter dropdowns when org has issue-scoped fields - [ ] Selecting a filter value narrows the issue list correctly - [ ] Filter state persists when changing sort, page, or other filters - [ ] Clearing a filter (selecting "All") removes the constraint - [ ] API: `GET /repos/{owner}/{repo}/issues?cf_5=High` returns only matching issues - [ ] Multiple filters: `?cf_5=High&cf_8=Bug` returns issues matching both - [ ] Issues without a value for a filtered field are excluded Closes #496 _Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>_ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jmiller added 1 commit 2026-06-05 21:36:05 +00:00
feat(issues): advanced search with custom field filters (#496)
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Report Issues (push) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 1s
Universal: PR Check / Build RC Package (pull_request) Blocked by required conditions
Universal: PR Check / Report Issues (pull_request) Blocked by required conditions
Generic: Repo Health / Scripts governance (pull_request) Blocked by required conditions
Generic: Repo Health / Repository health (pull_request) Blocked by required conditions
Generic: Repo Health / Report Issues (pull_request) Blocked by required conditions
Branch Policy Check / Verify merge target (pull_request) Successful in 2s
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 2s
PR RC Release / Build RC Release (pull_request) Successful in 3s
Universal: PR Check / Validate PR (pull_request) Failing after 14s
ad4451f23c
Add the ability to filter issues by custom field values throughout
the entire search stack:

- DB: applyCustomFieldCondition joins custom_field_value with AND
  semantics (all specified fields must match)
- Indexer: CustomFieldFilters map passed through SearchOptions and
  ToDBOptions
- Web: parse cf_{fieldID}={value} query params, show dropdown
  filters in the issue list sidebar for org-level fields
- API: both SearchIssues and ListIssues accept cf_ query params

Closes #496

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jmiller added 1 commit 2026-06-06 02:41:16 +00:00
fix(issues): address review findings for custom field search
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Report Issues (push) Blocked by required conditions
Universal: PR Check / Build RC Package (pull_request) Blocked by required conditions
Universal: PR Check / Report Issues (pull_request) Blocked by required conditions
Generic: Repo Health / Scripts governance (pull_request) Blocked by required conditions
Generic: Repo Health / Repository health (pull_request) Blocked by required conditions
Generic: Repo Health / Report Issues (pull_request) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Branch Policy Check / Verify merge target (pull_request) Successful in 2s
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Generic: Repo Health / Access control (pull_request) Successful in 2s
PR RC Release / Build RC Release (pull_request) Successful in 3s
Universal: PR Check / Validate PR (pull_request) Failing after 7s
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
0109a2db12
- Clear custom field filters when field definitions fail to load,
  preventing invisible filtering with no UI to undo
- Log malformed options JSON instead of silently dropping fields
- Extract parseCustomFieldQueryParams helper (web) and
  parseAPICustomFieldFilters helper (API) to deduplicate cf_ parsing
- API returns 400 for non-numeric or non-positive cf_ field IDs
- Validate field IDs are positive in web handler
- Add entity_type='issue' to subquery to prevent cross-entity matching

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jmiller merged commit cfdb9b4f0a into dev 2026-06-06 04:07:26 +00:00
jmiller deleted branch feat/issue-custom-field-search 2026-06-06 04:07:26 +00:00
Sign in to join this conversation.
No Reviewers
No labels
Type
Status
Priority
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoGitea#497