{"record":{"id":"5a852d69dfc635b6","repo":"github/github-mcp-server","slug":"issue-field-q-was-not-found-in-s-s","errorCode":null,"errorMessage":"issue field %q was not found in %s/%s","messagePattern":"issue field %q was not found in (.+?)/(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/issues.go","lineNumber":342,"sourceCode":"\t\t\tname = string(node.IssueFieldText.Name)\n\t\tcase \"IssueFieldNumber\":\n\t\t\tname = string(node.IssueFieldNumber.Name)\n\t\tcase \"IssueFieldDate\":\n\t\t\tname = string(node.IssueFieldDate.Name)\n\t\tcase \"IssueFieldSingleSelect\":\n\t\t\tname = string(node.IssueFieldSingleSelect.Name)\n\t\tdefault:\n\t\t\tcontinue\n\t\t}\n\t\tfieldByName[strings.ToLower(strings.TrimSpace(name))] = node\n\t}\n\n\tresolved := make([]*github.IssueRequestFieldValue, 0, len(issueFields))\n\tvar fieldIDsToDelete []int64\n\tfor _, fieldInput := range issueFields {\n\t\tnode, ok := fieldByName[strings.ToLower(strings.TrimSpace(fieldInput.FieldName))]\n\t\tif !ok {\n\t\t\treturn nil, nil, fmt.Errorf(\"issue field %q was not found in %s/%s\", fieldInput.FieldName, owner, repo)\n\t\t}\n\n\t\tvar fullDatabaseIDStr, dataType string\n\t\tswitch string(node.TypeName) {\n\t\tcase \"IssueFieldText\":\n\t\t\tfullDatabaseIDStr = string(node.IssueFieldText.FullDatabaseID)\n\t\t\tdataType = string(node.IssueFieldText.DataType)\n\t\tcase \"IssueFieldNumber\":\n\t\t\tfullDatabaseIDStr = string(node.IssueFieldNumber.FullDatabaseID)\n\t\t\tdataType = string(node.IssueFieldNumber.DataType)\n\t\tcase \"IssueFieldDate\":\n\t\t\tfullDatabaseIDStr = string(node.IssueFieldDate.FullDatabaseID)\n\t\t\tdataType = string(node.IssueFieldDate.DataType)\n\t\tcase \"IssueFieldSingleSelect\":\n\t\t\tfullDatabaseIDStr = string(node.IssueFieldSingleSelect.FullDatabaseID)\n\t\t\tdataType = string(node.IssueFieldSingleSelect.DataType)\n\t\t}\n","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/issues.go#L324-L360","documentation":"resolveIssueRequestFieldValues (pkg/github/issues.go:342) matches each requested field_name (lowercased and trimmed) against the repository's issue fields returned by the metadata query. This error fires when no configured field matches — the field genuinely does not exist in owner/repo, so its database ID cannot be resolved and the write is aborted before any mutation.","triggerScenarios":"update_issue with field_name \"priority\" when the repo's field is named \"Priority\" is fine (case-insensitive) — but \"Prioroty\" (typo), \"Priority Level\" (renamed), or a field defined in a different repo/organization template fails. Also when the repo has zero issue fields configured.","commonSituations":"Fields renamed or removed by admins after scripts were written; copying tool payloads between repos with different field sets; issue-fields preview returning an incomplete list; typo'd names from LLM args.","solutions":["List the repository's issue fields first (repo settings, or the metadata query) and use the exact configured name","Match is case-insensitive and whitespace-trimmed — fix pure typos only","If fields were renamed, update the payload to the new name","If the repo has no fields, configure them in repository settings before calling update_issue with issue_fields"],"exampleFix":"# before\n{\"issue_fields\": [{\"field_name\": \"Prioroty\", \"field_option_name\": \"P0\"}]}\n\n# after\n{\"issue_fields\": [{\"field_name\": \"Priority\", \"field_option_name\": \"P0\"}]}","handlingStrategy":"validation","validationCode":"// fetch configured field names once, then diff\nknown := fetchRepoIssueFieldNames(ctx, gqlClient, owner, repo) // lowercased set\nfor _, f := range requestedFields {\n    if !known[strings.ToLower(strings.TrimSpace(f))] {\n        return fmt.Errorf(\"field %q not configured in %s/%s; available: %v\", f, owner, repo, known)\n    }\n}","typeGuard":"func isKnownField(name string, known map[string]bool) bool {\n    return known[strings.ToLower(strings.TrimSpace(name))]\n}","tryCatchPattern":null,"preventionTips":["Cache the repo's issue-field names at job start and validate every payload against them","Re-validate after admins announce field renames; treat field-name drift as a config change","Trim and lowercase names client-side — the server does, so exact-case matches are unnecessary"],"tags":["go","graphql","issue-fields","validation"],"backgroundTag":null,"analyzedSha":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}