{"record":{"id":"33858a85a9c66798","repo":"github/github-mcp-server","slug":"field-filters-q-is-not-a-valid-date-for-q-expe","errorCode":null,"errorMessage":"field_filters: %q is not a valid date for %q (expected YYYY-MM-DD): %s","messagePattern":"field_filters: %q is not a valid date for %q \\(expected YYYY-MM-DD\\): (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/issues.go","lineNumber":3140,"sourceCode":"\t\t\t\t\tmatched = o.Name\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif matched == \"\" {\n\t\t\t\toptionNames := make([]string, 0, len(field.Options))\n\t\t\t\tfor _, o := range field.Options {\n\t\t\t\t\toptionNames = append(optionNames, o.Name)\n\t\t\t\t}\n\t\t\t\treturn nil, fmt.Errorf(\"field_filters: %q is not a valid option for %q. Valid options: %s\", rf.Value, field.Name, strings.Join(optionNames, \", \"))\n\t\t\t}\n\t\t\tv := githubv4.String(matched)\n\t\t\tfilter.SingleSelectOptionValue = &v\n\t\tcase \"TEXT\":\n\t\t\tv := githubv4.String(rf.Value)\n\t\t\tfilter.TextValue = &v\n\t\tcase \"DATE\":\n\t\t\tif _, err := time.Parse(\"2006-01-02\", rf.Value); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"field_filters: %q is not a valid date for %q (expected YYYY-MM-DD): %s\", rf.Value, field.Name, err.Error())\n\t\t\t}\n\t\t\tv := githubv4.String(rf.Value)\n\t\t\tfilter.DateValue = &v\n\t\tcase \"NUMBER\":\n\t\t\tn, err := strconv.ParseFloat(rf.Value, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"field_filters: %q is not a valid number for %q: %s\", rf.Value, field.Name, err.Error())\n\t\t\t}\n\t\t\tv := githubv4.Float(n)\n\t\t\tfilter.NumberValue = &v\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"field_filters: field %q has unsupported data_type %q\", field.Name, field.DataType)\n\t\t}\n\t\tout = append(out, filter)\n\t}\n\treturn out, nil\n}\n","sourceCodeStart":3122,"sourceCodeEnd":3158,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/issues.go#L3122-L3158","documentation":"For a DATE issue field, resolveFieldFilters requires the value to parse as YYYY-MM-DD (time.Parse with layout \"2006-01-02\"). The underlying Go parse error is appended. Full timestamps or other date formats are rejected even though they are valid ISO 8601.","triggerScenarios":"field_filters entry on a DATE field with a value like \"2023/01/15\", \"January 15 2023\", or \"2023-01-15T14:30:00Z\".","commonSituations":"Reusing an ISO timestamp accepted by the since/until parameters elsewhere; locale-specific date formats from user input; script formatting dates with slashes.","solutions":["Format the value as YYYY-MM-DD (zero-padded), e.g. \"2023-01-15\"","Truncate timestamps to their date part before sending","Normalize user-supplied dates through a date parser in your code first"],"exampleFix":"// before\n{\"field_filters\":[{\"field_name\":\"Target Date\",\"value\":\"15/01/2023\"}]}\n// after\n{\"field_filters\":[{\"field_name\":\"Target Date\",\"value\":\"2023-01-15\"}]}","handlingStrategy":"validation","validationCode":"var dateRe = regexp.MustCompile(`^\\d{4}-\\d{2}-\\d{2}$`)\n\nfunc validFilterDate(s string) bool {\n\tif !dateRe.MatchString(s) {\n\t\treturn false\n\t}\n\t_, err := time.Parse(\"2006-01-02\", s)\n\treturn err == nil\n}","typeGuard":"func isYYYYMMDD(s string) bool {\n\t_, err := time.Parse(\"2006-01-02\", s)\n\treturn err == nil\n}","tryCatchPattern":null,"preventionTips":["Normalize all dates to YYYY-MM-DD before building field_filters","Truncate timestamps to the date part for DATE-typed fields"],"tags":["validation","field-filters","date","issues"],"backgroundTag":null,"analyzedSha":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}