{"record":{"id":"f13451fceba3dc29","repo":"projectdiscovery/nuclei","slug":"couldn-t-iterate-on-nested-item-s-s","errorCode":null,"errorMessage":"couldn't iterate on nested item \"%s\": %s","messagePattern":"couldn't iterate on nested item \"(.+?)\": (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/reporting/trackers/jira/jira.go","lineNumber":290,"sourceCode":"\tseverityLabel := fmt.Sprintf(\"Severity:%s\", event.Info.SeverityHolder.Severity.String())\n\tif i.options.SeverityAsLabel && severityLabel != \"\" {\n\t\tlabels = append(labels, severityLabel)\n\t}\n\tif label := i.options.IssueType; label != \"\" {\n\t\tlabels = append(labels, label)\n\t}\n\t// Build template context for evaluating custom field templates\n\ttemplateCtx := buildTemplateContext(event)\n\n\t// Process custom fields with template evaluation support\n\tcustomFields := tcontainer.NewMarshalMap()\n\tfor name, value := range i.options.CustomFields {\n\t\tif valueMap, ok := value.(map[interface{}]interface{}); ok {\n\t\t\t// Iterate over nested map\n\t\t\tfor nestedName, nestedValue := range valueMap {\n\t\t\t\tfmtNestedValue, ok := nestedValue.(string)\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil, fmt.Errorf(`couldn't iterate on nested item \"%s\": %s`, nestedName, nestedValue)\n\t\t\t\t}\n\n\t\t\t\t// Evaluate template or handle legacy $variable syntax\n\t\t\t\tevaluatedValue, err := i.evaluateCustomFieldValue(fmtNestedValue, templateCtx, event)\n\t\t\t\tif err != nil {\n\t\t\t\t\tgologger.Warning().Msgf(\"Failed to evaluate template for field %s.%s: %v\", name, nestedName, err)\n\t\t\t\t\tevaluatedValue = fmtNestedValue // fallback to original value\n\t\t\t\t}\n\n\t\t\t\tswitch nestedName {\n\t\t\t\tcase \"id\":\n\t\t\t\t\tcustomFields[name] = map[string]interface{}{\"id\": evaluatedValue}\n\t\t\t\tcase \"name\":\n\t\t\t\t\tcustomFields[name] = map[string]interface{}{\"value\": evaluatedValue}\n\t\t\t\tcase \"freeform\":\n\t\t\t\t\tcustomFields[name] = evaluatedValue\n\t\t\t\t}\n\t\t\t}","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/reporting/trackers/jira/jira.go#L272-L308","documentation":"Error \"couldn't iterate on nested item \"%s\": %s\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/reporting/trackers/jira/jira.go:290 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}