{"record":{"id":"13a5e72051b977f2","repo":"theonedev/onedev","slug":"criteria-operator-is-not-supported-here-13a5e7","errorCode":null,"errorMessage":"Criteria '${operator}' is not supported here","messagePattern":"Criteria '(.+?)' is not supported here","errorType":"exception","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/search/entity/pullrequest/PullRequestQuery.java","lineNumber":164,"sourceCode":"\t\t\t\t\t@Override\n\t\t\t\t\tpublic Criteria<PullRequest> visitFuzzyCriteria(FuzzyCriteriaContext ctx) {\n\t\t\t\t\t\treturn new FuzzyCriteria(getValue(ctx.getText()));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Criteria<PullRequest> visitOperatorCriteria(OperatorCriteriaContext ctx) {\n\t\t\t\t\t\tswitch (ctx.operator.getType()) {\n\t\t\t\t\t\t\tcase Open:\n\t\t\t\t\t\t\t\treturn new OpenCriteria();\n\t\t\t\t\t\t\tcase Merged:\n\t\t\t\t\t\t\t\treturn new MergedCriteria();\n\t\t\t\t\t\t\tcase Discarded:\n\t\t\t\t\t\t\t\treturn new DiscardedCriteria();\n\t\t\t\t\t\t\tcase ReadyToMerge:\n\t\t\t\t\t\t\t\treturn new ReadyToMergeCriteria();\n\t\t\t\t\t\t\tcase NeedMyAction:\n\t\t\t\t\t\t\t\tif (!withCurrentUserCriteria)\n\t\t\t\t\t\t\t\t\tthrow new ExplicitException(\"Criteria '\" + ctx.operator.getText() + \"' is not supported here\");\n\t\t\t\t\t\t\t\treturn new NeedMyActionCriteria();\n\t\t\t\t\t\t\tcase ToBeMergedByMe:\n\t\t\t\t\t\t\t\tif (!withCurrentUserCriteria)\n\t\t\t\t\t\t\t\t\tthrow new ExplicitException(\"Criteria '\" + ctx.operator.getText() + \"' is not supported here\");\n\t\t\t\t\t\t\t\treturn new ToBeMergedByMeCriteria();\n\t\t\t\t\t\t\tcase ToBeChangedByMe:\n\t\t\t\t\t\t\t\tif (!withCurrentUserCriteria)\n\t\t\t\t\t\t\t\t\tthrow new ExplicitException(\"Criteria '\" + ctx.operator.getText() + \"' is not supported here\");\n\t\t\t\t\t\t\t\treturn new ToBeChangedByMeCriteria();\n\t\t\t\t\t\t\tcase MentionedMe:\n\t\t\t\t\t\t\t\tif (!withCurrentUserCriteria)\n\t\t\t\t\t\t\t\t\tthrow new ExplicitException(\"Criteria '\" + ctx.operator.getText() + \"' is not supported here\");\n\t\t\t\t\t\t\t\treturn new MentionedMeCriteria();\n\t\t\t\t\t\t\tcase SubmittedByMe:\n\t\t\t\t\t\t\t\tif (!withCurrentUserCriteria)\n\t\t\t\t\t\t\t\t\tthrow new ExplicitException(\"Criteria '\" + ctx.operator.getText() + \"' is not supported here\");\n\t\t\t\t\t\t\t\treturn new SubmittedByMeCriteria();\n\t\t\t\t\t\t\tcase WatchedByMe:","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/search/entity/pullrequest/PullRequestQuery.java#L146-L182","documentation":"PullRequestQuery's operator-criteria visitor only accepts state operators (Open, Merged, Discarded, ReadyToMerge) unconditionally; user-relative operators such as NeedMyAction are only legal when the query is parsed with current-user criteria enabled, otherwise this error names the unsupported operator.","triggerScenarios":"Thrown at server-core/src/main/java/io/onedev/server/search/entity/pullrequest/PullRequestQuery.java:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only state operators (Open, Merged, Discarded, ReadyToMerge) in this query context.","Request/query the pull request list through an API entry point that supports current-user criteria if NeedMyAction-like filters are needed."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}