{"record":{"id":"9faf97f7ace04a5f","repo":"theonedev/onedev","slug":"unable-to-find-group-groupname-9faf97","errorCode":null,"errorMessage":"Unable to find group: ${groupName}","messagePattern":"Unable to find group: (.+?)","errorType":"exception","errorClass":"NotFoundException","httpStatus":404,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/util/QueryUtils.java","lineNumber":98,"sourceCode":"\tpublic static long getLongValue(String value) {\n\t\ttry {\n\t\t\treturn Long.parseLong(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new NotAcceptableException(\"Invalid number: \" + value);\n\t\t}\n\t}\n\t\n\tpublic static User getUser(String loginName) {\n\t\tUser user = OneDev.getInstance(UserService.class).findByName(loginName);\n\t\tif (user == null)\n\t\t\tthrow new NotFoundException(\"Unable to find user with login: \" + loginName);\n\t\treturn user;\n\t}\n\n\tpublic static Group getGroup(String groupName) {\n\t\tGroup group = OneDev.getInstance(GroupService.class).find(groupName);\n\t\tif (group == null)\n\t\t\tthrow new NotFoundException(\"Unable to find group: \" + groupName);\n\t\treturn group;\n\t}\n\t\n\tpublic static Project getProject(String projectPath) {\n\t\tProject project = OneDev.getInstance(ProjectService.class).findByPath(projectPath);\n\t\tif (project == null)\n\t\t\tthrow new NotFoundException(\"Unable to find project '\" + projectPath + \"'\");\n\t\treturn project;\n\t}\n\t\n\tpublic static boolean getBooleanValue(String value) {\n\t\tif (value.equals(\"true\"))\n\t\t\treturn true;\n\t\telse if (value.equals(\"false\"))\n\t\t\treturn false;\n\t\telse\n\t\t\tthrow new NotAcceptableException(\"Invalid boolean: \" + value);\n\t}","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/util/QueryUtils.java#L80-L116","documentation":"QueryUtils.getGroup resolves a group name to a Group via GroupService.find. When the group does not exist, it throws NotFoundException(\"Unable to find group: ...\"), failing queries that reference unknown groups.","triggerScenarios":"Using a group name in an issue query criterion (e.g. group-based field conditions) where the group was deleted, renamed, or the name is misspelled.","commonSituations":"Saved queries broken after group reorganization/renames; typos in group names; groups synced from LDAP/SSO whose names changed; REST consumers using stale group lists.","solutions":["Check the exact group name in Administration > Groups and correct the query","Recreate the group if it was deleted and is still referenced","Update saved queries after group renames or directory-sync name changes"],"exampleFix":"// before\nQueryUtils.getGroup(\"devops\"); // throws if group is 'DevOps'\n// after\nQueryUtils.getGroup(\"DevOps\");","handlingStrategy":"validation","validationCode":"Group group = OneDev.getInstance(GroupService.class).find(groupName);\nboolean groupExists = group != null;","typeGuard":null,"tryCatchPattern":"try {\n    Group g = QueryUtils.getGroup(groupName);\n} catch (NotFoundException e) {\n    // surface a list of existing groups for correction\n}","preventionTips":["Use group pickers fed by the API instead of typed names","Re-check saved queries after group renames or LDAP/SSO sync changes","Standardize group naming to avoid case and typo mistakes"],"tags":["query","groups","not-found","onedev"],"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"}