Compare commits

...

2 Commits

Author SHA1 Message Date
cde0b39265 use ptr for ordering 2024-01-07 20:00:15 +01:00
dc372d272f fix selection bug in list mode 2024-01-07 19:50:32 +01:00
2 changed files with 9 additions and 9 deletions

View File

@ -27,7 +27,7 @@ import (
"time"
)
type Issues []Issue
type Issues []*Issue
type Issue struct {
Id uint32
@ -96,7 +96,7 @@ type Change struct {
Note struct{ id int32 }
}
type ByCategory []Issue
type ByCategory []*Issue
func (b ByCategory) Len() int { return len(b) }
func (b ByCategory) Less(i, j int) bool {
@ -104,7 +104,7 @@ func (b ByCategory) Less(i, j int) bool {
}
func (b ByCategory) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
type ByAssignment []Issue
type ByAssignment []*Issue
func (b ByAssignment) Len() int { return len(b) }
func (b ByAssignment) Less(i, j int) bool {
@ -112,13 +112,13 @@ func (b ByAssignment) Less(i, j int) bool {
}
func (b ByAssignment) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
type ById []Issue
type ById []*Issue
func (b ById) Len() int { return len(b) }
func (b ById) Less(i, j int) bool { return b[i].Id < b[j].Id }
func (b ById) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
type ByTarget []Issue
type ByTarget []*Issue
func (b ByTarget) Len() int { return len(b) }
func (b ByTarget) Less(i, j int) bool {
@ -126,7 +126,7 @@ func (b ByTarget) Less(i, j int) bool {
}
func (b ByTarget) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
type ByHandlerAndId []Issue
type ByHandlerAndId []*Issue
func (b ByHandlerAndId) Len() int { return len(b) }
func (b ByHandlerAndId) Less(i, j int) bool {
@ -238,7 +238,7 @@ func (ms *multiSorter) Swap(i, j int) {
}
func (ms *multiSorter) Less(i, j int) bool {
p, q := &ms.issues[i], &ms.issues[j]
p, q := ms.issues[i], ms.issues[j]
var k int
for k = 0; k < len(ms.less)-1; k++ {
less := ms.less[k]

View File

@ -92,7 +92,7 @@ pre {
{{ if $hasentries }}<h4 class="version">{{ $tar }} <span class="small">({{$version.Timestamp.Format "02 Jan 06"}})</span></h4> {{ end }}
{{ if $hasfeatures }}
<h5 class="features">Features</h5>
{{- range $sorter.Sort ($features.ByCategory $cat) }}
{{- range $sorter.Sort ($features.ByCategoryAndTarget $cat $tar) }}
<details>
<summary>
{{ if .IsHandled }}<span title="assigned to {{.Handler.Name}}">🥷</span>{{else}}<span title="unassigned">❓</span>{{end}}
@ -105,7 +105,7 @@ pre {
{{ end }}
{{ if $hasissues }}
<h5 class="issues">Issues</h5>
{{- range $sorter.Sort ($issues.ByCategory $cat) }}
{{- range $sorter.Sort ($issues.ByCategoryAndTarget $cat $tar) }}
<details>
<summary>
{{ if .IsHandled }}<span title="assigned to {{.Handler.Name}}">🥷</span>{{else}}<span title="unassigned">❓</span>{{end}}