andygrunwald / andygrunwald/go-jira

Issue.Search()'s Status field isn't being set

Aberta
#331 3 comentários 0 reações 0 responsáveis Ver no GitHub
needs triage
Linguagem predominante
Go
Estrelas
1.6k
Forks
500
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

## Describe the bug

Hey all,

I recently began learning Go and working on a little project w/Jira to learn, so this may be an issue with my knowledge.

The issue is that when I use the Issue.Search() function, the Fields.Status field/property comes back as nil.

### Example:
```
u, _, err := client.Issue.Search("\"Epic Link\" = DOP-8", &searchOptions)
for _, issue := range u {
fmt.Printf("Key:%s | Status:%+v | Summary: %+v\n", issue.Key, issue.Fields.Status, issue.Fields.Summary)
}
```

```
OUTPUT:
Key:DOP-16 | Status: | Summary: s8
Key:DOP-15 | Status: | Summary: s7
etc...
```

However if I get a single issue via the Issue.Get() function, Fields.Status is set and contains the status and status category of the issue.

```
for _, issue := range u {
oneIssue, _, err := client.Issue.Get(issue.Key, nil)
fmt.Printf("Status: %+v\n", oneIssue.Fields.Status)
}

```

```
OUTPUT:
Status: &{Self:https:/....atlassian.net/rest/api/2/status/10001 Description: IconURL:https://....atlassian.net/ Name:Done ID:10001 StatusCategory:{Self:https://....atlassian.net/rest/api/2/statuscategory/3 ID:3 Name:Done Key:done ColorName:green}}
Status: &{Self:https://....atlassian.net/rest/api/2/status/10001 Description: IconURL:https://....atlassian.net/ Name:Done ID:10001 StatusCategory:{Self:https://....atlassian.net/rest/api/2/statuscategory/3 ID:3 Name:Done Key:done ColorName:green}}
```

If I get proficient enough would be happy to contribute a fix, but not sure if the issue from Search is expected behavior, and if I'm missing something...

Thx.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.