-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i parse SocOptionImpl custom field? #598
Comments
@ItamarShDev Can you provide a full but minimal code example? And please provide basic information like
Thank you |
@ItamarShDev Did you find a solution for your problem? |
@andygrunwald Thank you for making sure i will write my solution. I have meant to write a comment but forgot! What i did (and it might be a bad solution) is this: func (s *service) getFieldSocOptionImplValue(ticketFields *jira.IssueFields, fieldID string) string {
var fieldValue string
field, exist := ticketFields.Unknowns.Value(fieldID)
if exist {
fieldMap, ok := field.([]interface{})
if ok {
re := regexp.MustCompile(`value='(.*)'`)
for _, v := range fieldMap {
matches := re.FindStringSubmatch(v.(string))
fieldValue = matches[1]
}
}
}
return fieldValue
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When i call the ticket i get
SocOptionImpl{label='some-label', value='some-value'}
How can i parse it?
The text was updated successfully, but these errors were encountered: