{"record":{"id":"0fc3d43cf4cc28ad","repo":"theonedev/onedev","slug":"unable-to-find-group-groupname-0fc3d4","errorCode":null,"errorMessage":"Unable to find group '${groupName}'","messagePattern":"Unable to find group '(.+?)'","errorType":"validation","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/util/reviewrequirement/ReviewRequirement.java","lineNumber":80,"sourceCode":"\t\t\t\t\t\t\tthrow new ExplicitException(\"User '\" + userName + \"' is included multiple times\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new ExplicitException(\"Unable to find user '\" + userName + \"'\");\n\t\t\t\t\t}\n\t\t\t\t} else if (criteria.groupCriteria() != null) {\n\t\t\t\t\tString groupName = getValue(criteria.groupCriteria().Value());\n\t\t\t\t\tGroup group = OneDev.getInstance(GroupService.class).find(groupName);\n\t\t\t\t\tif (group != null) {\n\t\t\t\t\t\tif (!groups.containsKey(group)) {\n\t\t\t\t\t\t\tTerminalNode digit = criteria.groupCriteria().DIGIT();\n\t\t\t\t\t\t\tif (digit != null) \n\t\t\t\t\t\t\t\tgroups.put(group, Integer.parseInt(digit.getText()));\n\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\tgroups.put(group, 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new ExplicitException(\"Group '\" + groupName + \"' is included multiple times\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new ExplicitException(\"Unable to find group '\" + groupName + \"'\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\treturn new ReviewRequirement(users, groups);\n\t}\n\n\tprivate static String getValue(TerminalNode terminal) {\n\t\treturn StringUtils.unescape(FenceAware.unfence(terminal.getText())).trim();\n\t}\n\t\n\tpublic List<User> getUsers() {\n\t\treturn users;\n\t}\n\n\tpublic Map<Group, Integer> getGroups() {\n\t\treturn groups;","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/util/reviewrequirement/ReviewRequirement.java#L62-L98","documentation":"During review requirement parsing, a 'group:<name>' criterion whose group cannot be resolved by GroupService.find throws ExplicitException. The requirement references a group that does not exist and therefore cannot be satisfied.","triggerScenarios":"Parsing a requirement referencing a group that was deleted, renamed, or misspelled, e.g. 'group:qaa'.","commonSituations":"Group removal without updating project review settings; importing config from another instance; typo or trailing whitespace in the group name.","solutions":["Correct the group name in the requirement to an existing group","Recreate the missing group or replace the clause with a user list","Validate requirement strings with parse() in a try-catch before saving project settings"],"exampleFix":"// before\nreviewRequirement = \"group:qaa\";\n// after\nreviewRequirement = \"group:qa\";","handlingStrategy":"validation","validationCode":"GroupService groupService = OneDev.getInstance(GroupService.class);\nfor (String name : extractGroupNames(requirement)) {\n    if (groupService.find(name) == null)\n        throw new ExplicitException(\"Unknown group in requirement: \" + name);\n}","typeGuard":null,"tryCatchPattern":"try {\n    ReviewRequirement.parse(req);\n} catch (ExplicitException e) {\n    ui.showError(e.getMessage());\n}","preventionTips":["Select groups via a picker bound to GroupService.find","Audit requirements when groups are deleted","Fail fast by parsing at settings-save time"],"tags":["review-requirement","group-not-found","validation"],"backgroundTag":"resource-not-found","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"}