← All requests
0

Search should match labels and custom field values

OpenSearch & filtersRandy Sauers ·

Summary

Global search matches task titles, descriptions, comments, and activities. It does not match label names or custom field values. A task labelled deferred or doc, or a task with a Doc custom field set to PRC-003, is invisible to search unless the same text appears in the title or description.

Motivation

  • Labels are first-class task metadata: deferred, blocked, task, investigation, build, doc, and domain labels.
  • Custom fields hold structured references: IDs, document IDs, decision refs, effort.
  • The current workaround is to duplicate the value in the description (the **ID:** line exists for this reason). That is a second source of truth and drifts.
  • The MCP search tool inherits the API search, so agents cannot find tasks by label or custom field either.

Proposed changes

  1. Extend GET /search to match label names attached to tasks.
  2. Extend GET /search to match custom field values for text-like fields (text, number, date, dropdown, multiselect, boolean). For dropdown and multiselect, match the option label; for date, match the ISO date; for boolean, match true or false.
  3. Include the match source in the result payload (matchedOn, matchedValue) so the UI can show why a result matched.
  4. Keep the existing relevance order: title, then description, then label or custom field, then comment or activity.
  5. The MCP search tool returns the same matches without a separate change.

Acceptance criteria

  • Searching a label name returns every task that carries that label, even when the label name is not in the title or description.
  • Searching a custom field value returns every task with that value, even when the value is not in the title or description.
  • Results are permission-scoped to the workspace and project.
  • The result payload identifies the match source.
  • Existing title, description, comment, and activity search behavior is unchanged.
  • The MCP search tool returns the same results.

Checked open issues

  • #53 advanced filtering, sorting, grouping and saved views (UI filters, not search indexing).
  • #33 canonical label identity (label IDs, not search).
  • #107 workspace-level shared custom fields (field scope, not search).
  • #1986 MCP unable to access custom fields (closed, fixed by #2033; not search).

Additional context

  • Current search source: apps/api/src/search/controllers/global-search.ts matches task.title, task.description, project.name, project.description, workspace.name, workspace.description, and activity.content or task.title. It never joins the label or custom field tables.
  • The SearchResult schema has no label or custom field fields.
  • The listTasks endpoint has no label or custom field filter either, so there is no server-side workaround.

Discussion 0

No comments yet.

Sign in to comment.

Keyboard shortcuts

Anywhere

Go to requests
gh
Go to changelog
gc
Go to notifications
gn
Next or previous page
norp
Leave a text field or close a menu
Esc
Show this list
?

Requests

Move to the next or previous request
jork
Open the selected request
oorEnter
Vote on the selected request
v
Search
/
New request
c

Request

Vote
v
Write a comment
c
Edit
e