{"record":{"id":"f20fac4ca51ad626","repo":"gastownhall/beads","slug":"updated-does-not-support-s-operator","errorCode":null,"errorMessage":"updated does not support %s operator","messagePattern":"updated does not support (.+?) operator","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/query/evaluator.go","lineNumber":380,"sourceCode":"\t\treturn fmt.Errorf(\"invalid updated time: %w\", err)\n\t}\n\tswitch comp.Op {\n\tcase OpEquals:\n\t\tdayStart := time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, t.Location())\n\t\tdayEnd := dayStart.Add(24 * time.Hour)\n\t\tfilter.UpdatedAfter = &dayStart\n\t\tfilter.UpdatedBefore = &dayEnd\n\tcase OpGreater:\n\t\tfilter.UpdatedAfter = &t\n\tcase OpGreaterEq:\n\t\tfilter.UpdatedAfter = &t\n\tcase OpLess:\n\t\tfilter.UpdatedBefore = &t\n\tcase OpLessEq:\n\t\tendOfDay := time.Date(t.Year(), t.Month(), t.Day(), 23, 59, 59, 999999999, t.Location())\n\t\tfilter.UpdatedBefore = &endOfDay\n\tdefault:\n\t\treturn fmt.Errorf(\"updated does not support %s operator\", comp.Op.String())\n\t}\n\treturn nil\n}\n\nfunc (e *Evaluator) applyClosedFilter(comp *ComparisonNode, filter *types.IssueFilter) error {\n\tt, err := e.parseTimeValue(comp)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"invalid closed time: %w\", err)\n\t}\n\tswitch comp.Op {\n\tcase OpGreater:\n\t\tfilter.ClosedAfter = &t\n\tcase OpGreaterEq:\n\t\tfilter.ClosedAfter = &t\n\tcase OpLess:\n\t\tfilter.ClosedBefore = &t\n\tcase OpLessEq:\n\t\tendOfDay := time.Date(t.Year(), t.Month(), t.Day(), 23, 59, 59, 999999999, t.Location())","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/query/evaluator.go#L362-L398","documentation":"The updated field accepts only =, >, >=, <, and <= in filter mode (mapped to UpdatedAfter/UpdatedBefore). An operator outside that set — typically != — lands in the switch default and returns this error naming the unsupported operator. The time value was valid; only the operator is rejected.","triggerScenarios":"Queries like `updated != 2026-08-01` or other non-comparison operators on updated reach the default branch of applyUpdatedFilter.","commonSituations":"Attempting to exclude a specific update date; generated queries from tools assuming full operator sets; users translating SQL WHERE clauses directly into bd query syntax.","solutions":["Rephrase negation as a disjunction of supported comparisons (e.g. `updated < X OR updated > Y`)","Restrict to =, >, >=, <, <= when building updated filters","Use predicate mode if the needed operator is supported by buildUpdatedPredicate"],"exampleFix":"// before\nbd list 'updated != today'\n// after\nbd list 'updated < today OR updated > tomorrow'","handlingStrategy":"validation","validationCode":"// Allow only supported updated operators\nvar allowed = map[Op]bool{OpEquals: true, OpGreater: true, OpGreaterEq: true, OpLess: true, OpLessEq: true}\nif comp.Field == \"updated\" && !allowed[comp.Op] {\n\treturn fmt.Errorf(\"updated does not support %s\", comp.Op.String())\n}","typeGuard":"func updatedOpSupported(op Op) bool {\n\tswitch op {\n\tcase OpEquals, OpGreater, OpGreaterEq, OpLess, OpLessEq:\n\t\treturn true\n\t}\n\treturn false\n}","tryCatchPattern":"if err := eval.applyComparison(comp, filter); err != nil {\n\tif strings.Contains(err.Error(), \"updated does not support\") {\n\t\t// rewrite the negation as a range: updated < X OR updated > Y\n\t}\n}","preventionTips":["Use only =, >, >=, <, <= with updated","Express 'not on date D' as two range comparisons","Gate query builders on the operator whitelist before emitting syntax"],"tags":["query","time-filter","updated","unsupported-operator"],"backgroundTag":"unsupported-query-operator","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}