gastownhall/beads · error
type only supports = and != operators
Error message
type only supports = and != operators
What it means
Like status, the type field only supports equality operators. applyTypeFilter rejects any ComparisonNode with Field="type" whose operator is not = or !=. Unlike status, there is no value validation here — any string is accepted as an IssueType and simply won't match unknown types in results.
Source
Thrown at internal/query/evaluator.go:264
filter.PriorityMax = &max
case OpLessEq:
filter.PriorityMax = &priority
case OpGreater:
// priority > X means PriorityMin = X+1
min := priority + 1
if min > 4 {
return fmt.Errorf("priority > %d matches nothing", priority)
}
filter.PriorityMin = &min
case OpGreaterEq:
filter.PriorityMin = &priority
}
return nil
}
func (e *Evaluator) applyTypeFilter(comp *ComparisonNode, filter *types.IssueFilter) error {
if comp.Op != OpEquals && comp.Op != OpNotEquals {
return fmt.Errorf("type only supports = and != operators")
}
issueType := types.IssueType(strings.ToLower(comp.Value))
if comp.Op == OpEquals {
filter.IssueType = &issueType
} else {
filter.ExcludeTypes = append(filter.ExcludeTypes, issueType)
}
return nil
}
func (e *Evaluator) applyAssigneeFilter(comp *ComparisonNode, filter *types.IssueFilter) error {
if comp.Op != OpEquals {
return fmt.Errorf("assignee only supports = operator")
}
if comp.Value == "" || strings.ToLower(comp.Value) == "none" || strings.ToLower(comp.Value) == "null" {
filter.NoAssignee = true
} else {
filter.Assignee = &comp.ValueView on GitHub (pinned to 71377f2769)
Solutions
- Rewrite with = or != : e.g. `type = bug`.
- To match multiple types, issue one query per type or use the Go API setting IssueFilter.ExcludeTypes for exclusion.
- For fuzzy matching, use the text search fields (title/description) instead of type.
Example fix
// before "type >= bug" // after "type = bug"
Defensive patterns
Strategy: validation
Validate before calling
func validateTypeOp(op query.Op) error {
if op != query.OpEquals && op != query.OpNotEquals {
return fmt.Errorf("type supports only = and !=, got %v", op)
}
return nil
} Try / catch
if err := e.applyComparison(comp, filter); err != nil {
if strings.Contains(err.Error(), "type only supports") {
return rewriteWithEquals(comp)
}
return err
} Prevention
- Never use LIKE/substring semantics on enum fields; use title/description search for fuzzy matching.
- Validate generated queries against a per-field operator whitelist.
- Check `bd schema` for valid type values since applyTypeFilter does not validate the value itself.
When it happens
Trigger: Queries like `type > bug`, `type <= feature`, `type ~ task` — Field="type" with Op other than OpEquals/OpNotEquals.
Common situations: SQL habits (`type LIKE ...`); generic query builders that default every field to an ordering operator; confusion between the `type` field and free-text search which does support substring matching.
Related errors
- status only supports = and != operators
- priority != requires predicate filtering
- assignee only supports = operator
- unknown field: %s
- invalid status: %s
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/a388b2c2cf66fe86.
Report an issue: GitHub.