show children of specification features
This commit is contained in:
parent
694de94c0b
commit
0a751aa722
5
data.go
5
data.go
@ -188,6 +188,11 @@ func (d *Data) getIssues() {
|
|||||||
var features = Issues{}
|
var features = Issues{}
|
||||||
var open = 0
|
var open = 0
|
||||||
for _, issue := range iss.Issues {
|
for _, issue := range iss.Issues {
|
||||||
|
for _, ch := range issue.Relationships {
|
||||||
|
if ch.Typ.Name == "parent-of" {
|
||||||
|
issue.Children = append(issue.Children, ch.Issue)
|
||||||
|
}
|
||||||
|
}
|
||||||
if issue.Resolution.Name == "open" &&
|
if issue.Resolution.Name == "open" &&
|
||||||
strings.Compare(d.minimumVersion, issue.TargetVersion.Name) < 0 {
|
strings.Compare(d.minimumVersion, issue.TargetVersion.Name) < 0 {
|
||||||
open++
|
open++
|
||||||
|
17
issues.go
17
issues.go
@ -49,10 +49,19 @@ type Issue struct {
|
|||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
Notes []Note
|
Notes []Note
|
||||||
Relationships []Relationship
|
Relationships []Relationship
|
||||||
|
Children []Child `json:"-"`
|
||||||
Tags []KeyVal
|
Tags []KeyVal
|
||||||
History []Change
|
History []Change
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Child struct {
|
||||||
|
Id uint32
|
||||||
|
Summary string
|
||||||
|
Status KeyVal
|
||||||
|
Resolution KeyVal
|
||||||
|
Handler KeyVal
|
||||||
|
}
|
||||||
|
|
||||||
type KeyVal struct {
|
type KeyVal struct {
|
||||||
Id uint32
|
Id uint32
|
||||||
Name string
|
Name string
|
||||||
@ -79,13 +88,7 @@ type Attachment struct {
|
|||||||
type Relationship struct {
|
type Relationship struct {
|
||||||
Id uint32
|
Id uint32
|
||||||
Typ KeyVal `json:"type"`
|
Typ KeyVal `json:"type"`
|
||||||
Issue struct {
|
Issue Child
|
||||||
Id uint32
|
|
||||||
Summary string
|
|
||||||
Status KeyVal
|
|
||||||
Resolution KeyVal
|
|
||||||
Handler KeyVal
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Change struct {
|
type Change struct {
|
||||||
|
@ -124,7 +124,12 @@ details[open].issue {
|
|||||||
{{- range $sorter.Sort . }}
|
{{- range $sorter.Sort . }}
|
||||||
{{ if .IsHandled }}<span title="assigned to {{.Handler.Name}}">🥷</span>{{else}}<span title="unassigned">❓</span>{{end}}
|
{{ if .IsHandled }}<span title="assigned to {{.Handler.Name}}">🥷</span>{{else}}<span title="unassigned">❓</span>{{end}}
|
||||||
<a href="https://bugs.gnunet.org/view.php?id={{.Id}}" target="_blank">{{.Id}}</a>
|
<a href="https://bugs.gnunet.org/view.php?id={{.Id}}" target="_blank">{{.Id}}</a>
|
||||||
<span class="severity-{{.Severity.Name}}">{{.Summary}}</span><br>
|
<span class="severity-{{.Severity.Name}}">{{.Summary}}</span>
|
||||||
|
{{ with .Children }}(children:
|
||||||
|
{{ range $child := . }}
|
||||||
|
<span class="child"><a href="https://bugs.gnunet.org/view.php?id={{$child.Id}}" target="_blank" title="{{$child.Summary}}">{{$child.Id}}</a> </span>
|
||||||
|
{{ end }})
|
||||||
|
{{ end }}<br>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</details>
|
</details>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user