Skip to content

--component as a first-class query filter with case-insensitive name expansion #606

Description

@arcaven

Proposal

--component as a first-class query filter — on issue list and every command that accepts --jql (e.g. the proposed issue comment add --jql #586, issue changelog --jql #587):

jr issue list --component Okta                          # component = resolved-ids
jr issue list --component Okta --component Teleport     # OR: component in (…)
jr issue list --component not:Vector                    # exclusion
jr issue list --component none                          # component is EMPTY (untagged-review queue)
jr issue list --component all:Vector --component all:Kubernetes   # issue has BOTH

Composes by AND with all other structured filters and with --jql (structured flags append AND (…)).

Resolution must be deterministic, not name-string trust

A primary purpose of components is search, and component names are load-bearing strings: cross-project queries match by name, and casing drift (CloudSmith vs Cloudsmith, Github vs GitHub, n8n vs N8N — real examples from our two projects) silently splits results. So resolve client-side by ID:

  1. Fetch components for the target project(s) — one cached call per project.
  2. NFKC-normalize + Unicode-casefold both sides; collect all matching component IDs across case variants and projects.
  3. Emit component in (id1, id2, …) — deterministic regardless of server-side name semantics; multi-project correctness (same name, different per-project IDs) falls out for free.
  4. Zero matches → edit-distance suggestion: did you mean: CloudSmith?. --exact opts out of case-folding.

Related: the jr component subcommand family and the generalized filter grammar are filed separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions