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:
5
issue.go
5
issue.go
@@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user