{"record":{"id":"7ac539be434243ee","repo":"gastownhall/beads","slug":"assignee-only-supports-operator","errorCode":null,"errorMessage":"assignee only supports = operator","messagePattern":"assignee only supports = operator","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/query/evaluator.go","lineNumber":277,"sourceCode":"\treturn nil\n}\n\nfunc (e *Evaluator) applyTypeFilter(comp *ComparisonNode, filter *types.IssueFilter) error {\n\tif comp.Op != OpEquals && comp.Op != OpNotEquals {\n\t\treturn fmt.Errorf(\"type only supports = and != operators\")\n\t}\n\tissueType := types.IssueType(strings.ToLower(comp.Value))\n\tif comp.Op == OpEquals {\n\t\tfilter.IssueType = &issueType\n\t} else {\n\t\tfilter.ExcludeTypes = append(filter.ExcludeTypes, issueType)\n\t}\n\treturn nil\n}\n\nfunc (e *Evaluator) applyAssigneeFilter(comp *ComparisonNode, filter *types.IssueFilter) error {\n\tif comp.Op != OpEquals {\n\t\treturn fmt.Errorf(\"assignee only supports = operator\")\n\t}\n\tif comp.Value == \"\" || strings.ToLower(comp.Value) == \"none\" || strings.ToLower(comp.Value) == \"null\" {\n\t\tfilter.NoAssignee = true\n\t} else {\n\t\tfilter.Assignee = &comp.Value\n\t}\n\treturn nil\n}\n\nfunc (e *Evaluator) applyOwnerFilter(comp *ComparisonNode, filter *types.IssueFilter) error {\n\t// Owner filtering requires predicate\n\treturn fmt.Errorf(\"owner filtering requires predicate mode\")\n}\n\nfunc (e *Evaluator) applyLabelFilter(comp *ComparisonNode, filter *types.IssueFilter) error {\n\tif comp.Op != OpEquals {\n\t\treturn fmt.Errorf(\"label only supports = operator\")\n\t}","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/query/evaluator.go#L259-L295","documentation":"The assignee field supports only exact equality (=). applyAssigneeFilter rejects !=, ordering, and all other operators because IssueFilter models assignment as a single exact-match Assignee string (plus a NoAssignee flag), with no exclude or range semantics. Using = with \"none\"/\"null\"/empty is interpreted as the special no-assignee filter.","triggerScenarios":"Queries like `assignee != alice`, `assignee > bob`, `assignee ~ carol` — Field=\"assignee\" with any Op other than OpEquals.","commonSituations":"Users who used `status != closed` or `type != bug` (both allowed) assuming != works everywhere; wanting \"unassigned\" via `assignee != something` instead of `assignee = none`.","solutions":["Use `assignee = <name>` for exact match, or `assignee = none` (also \"null\" or empty) for unassigned issues.","For exclusion, filter client-side: query broadly and drop issues whose Assignee equals the excluded value in code.","For multiple assignees, run one query per assignee and merge results."],"exampleFix":"// before (find unassigned)\n\"assignee != alice\"\n// after\n\"assignee = none\"  // unassigned; or filter alice out client-side","handlingStrategy":"validation","validationCode":"func validateAssigneeComp(op query.Op) error {\n    if op != query.OpEquals {\n        return fmt.Errorf(\"assignee supports only =; use assignee = none for unassigned\")\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":"if err := e.applyComparison(comp, filter); err != nil {\n    if strings.Contains(err.Error(), \"assignee only supports\") {\n        return fetchAndFilterClientSide(func(i types.Issue) bool { return i.Assignee != excluded })\n    }\n    return err\n}","preventionTips":["Use assignee = none (or null/empty) to find unassigned issues instead of !=.","Handle exclusions and multi-assignee logic client-side after an exact-match query.","Keep a per-field operator capability table in query-building code."],"tags":["query","assignee","operator","beads"],"backgroundTag":"unsupported-query-operator","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}