Skip to content

Commit 5ce76cb

Browse files
authored
Merge pull request #28605 from bradmwilliams/jira_customfields_fix
Fixes Jira CreateIssue() failing with Internal Server Error
2 parents 171e8cb + 56d0d20 commit 5ce76cb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

prow/jira/jira.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,12 @@ func unsetProblematicFields(issue *jira.Issue, responseBody string) (*jira.Issue
535535
for field := range processedResponse.Errors {
536536
delete(fieldsMap, field)
537537
}
538+
// Remove null value "customfields_" because they cause the server to return: 500 Internal Server Error
539+
for field, value := range fieldsMap {
540+
if strings.HasPrefix(field, "customfield_") && value == nil {
541+
delete(fieldsMap, field)
542+
}
543+
}
538544
issueMap["fields"] = fieldsMap
539545
// turn back into jira.Issue type
540546
marshalledFixedIssue, err := json.Marshal(issueMap)

0 commit comments

Comments
 (0)