1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-08-08 22:16:34 +02:00

Attempt to retrieve the actual string value of a complex type custom field instead of blindly converting to string.

This commit is contained in:
Rao Li
2016-09-06 16:14:15 -07:00
parent 479f9df7af
commit 4ad59bb4e7

View File

@@ -525,6 +525,11 @@ func (s *IssueService) GetCustomFields(issueID string) (CustomFields, *Response,
if rec, ok := f.(map[string]interface{}); ok {
for key, val := range rec {
if strings.Contains(key, "customfield") {
if valMap, ok := val.(map[string]interface{}); ok {
if v, ok := valMap["value"]; ok {
val = v
}
}
cf[key] = fmt.Sprint(val)
}
}