Skip to content

[feature]: Let work-items/search match work item descriptions and comments (opt-in) #10219

Open

Description

@pitupi

Is there an existing issue for this?

Searched on 2026-11-07 for work item search / comments search / description search: no match (closest, #10104, is about comment counts).

Summary

GET /api/v1/workspaces/{slug}/work-items/search/?search=<text> only matches name, sequence_id and project__identifier. Text that lives in the description or in comments cannot be found through the public API. Please add an opt-in parameter, for example fields=name,description,comments (default stays name, so nothing changes for current clients).

Why should this be worked on?

Decisions and evidence usually end up in the description or in comments, not in the title. Automation (and people using the API) cannot answer "was this already decided / reported?" without downloading every work item and every comment, which at 60 requests/minute per key takes minutes for a few hundred items. The columns needed already exist and are already stripped of HTML: Issue.description_stripped and IssueComment.comment_stripped.

Reproduction

repro_limitacoes.py (section 2) on v1.4.3: a word present only in the title → 1 result; only in the description → 0; only in a comment → 0.

Implementation sketch (not tested against the Plane test suite)

Pinned to 618d0eb7. apps/api/plane/api/views/issue.py, IssueSearchEndpoint (class at line 2420, field list at line 2463):

requested = set(request.query_params.get("fields", "name").split(","))
...
for field in fields:                      # existing loop over name / sequence_id / project__identifier
    ...
if "description" in requested:
    q |= Q(description_stripped__icontains=query)
if "comments" in requested:
    q |= Q(Exists(IssueComment.objects.filter(issue=OuterRef("pk"), comment_stripped__icontains=query)))

Keep the existing visible_issue_subquery so restricted guests still only see what they may see. Optionally return matched_in: ["description"] per result.

Tests worth adding

  1. Default call unchanged (title only).
  2. fields=description finds a word that exists only in the description.
  3. fields=comments finds a word that exists only in a comment, and does not return the item after the comment is deleted.
  4. A restricted guest does not get items they cannot see through the new fields.

Workaround we use meanwhile

A read-only local mirror of issues and comments (one Markdown file per work item, refreshed incrementally by updated_at) searched with plain text matching.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions