{"record":{"id":"7dc7e1d4a2b919ea","repo":"gastownhall/beads","slug":"created-does-not-support-s-operator","errorCode":null,"errorMessage":"created does not support %s operator","messagePattern":"created does not support (.+?) operator","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/query/evaluator.go","lineNumber":354,"sourceCode":"\t}\n\tswitch comp.Op {\n\tcase OpEquals:\n\t\t// For equals, set both before and after to bracket the day\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.CreatedAfter = &dayStart\n\t\tfilter.CreatedBefore = &dayEnd\n\tcase OpGreater:\n\t\tfilter.CreatedAfter = &t\n\tcase OpGreaterEq:\n\t\tfilter.CreatedAfter = &t\n\tcase OpLess:\n\t\tfilter.CreatedBefore = &t\n\tcase OpLessEq:\n\t\tendOfDay := time.Date(t.Year(), t.Month(), t.Day(), 23, 59, 59, 999999999, t.Location())\n\t\tfilter.CreatedBefore = &endOfDay\n\tdefault:\n\t\treturn fmt.Errorf(\"created does not support %s operator\", comp.Op.String())\n\t}\n\treturn nil\n}\n\nfunc (e *Evaluator) applyUpdatedFilter(comp *ComparisonNode, filter *types.IssueFilter) error {\n\tt, err := e.parseTimeValue(comp)\n\tif err != nil {\n\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:","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/query/evaluator.go#L336-L372","documentation":"The created field in filter mode supports only =, >, >=, <, and <= (mapping to CreatedAfter/CreatedBefore window bounds). Any other operator — typically != or IN — is rejected with this message that names the offending operator via comp.Op.String(). The value itself parsed fine; the operator is the problem.","triggerScenarios":"Queries like `created != 2026-01-01` or `created not in ...` produce a ComparisonNode whose Op falls into the switch's default branch of applyCreatedFilter.","commonSituations":"Trying to exclude a specific day (`created != date`) assuming negation is supported; grammar-generated queries using unsupported operators; users expecting SQL-like operator coverage.","solutions":["Express exclusion as a range: `created < X OR created > Y` around the unwanted point/day","Use supported operators: `created > t`, `created >= t`, `created < t`, `created <= t`, `created = t`","Use predicate mode if the desired operator is implemented in buildCreatedPredicate"],"exampleFix":"// before\nbd list 'created != 2026-08-01'\n// after\nbd list 'created < 2026-08-01 OR created > 2026-08-02'","handlingStrategy":"validation","validationCode":"// Allow only supported created operators\nvar allowed = map[Op]bool{OpEquals: true, OpGreater: true, OpGreaterEq: true, OpLess: true, OpLessEq: true}\nif comp.Field == \"created\" && !allowed[comp.Op] {\n\treturn fmt.Errorf(\"created does not support %s\", comp.Op.String())\n}","typeGuard":"func createdOpSupported(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(), \"created does not support\") {\n\t\t// rewrite as a range using < and > around the excluded point\n\t}\n}","preventionTips":["Restrict created comparisons to =, >, >=, <, <=","Rewrite != on a date as an OR of two range comparisons","Validate operators at query-construction time, before evaluation"],"tags":["query","time-filter","created","unsupported-operator"],"backgroundTag":"unsupported-query-operator","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}