Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Sort the issue list by when it last moved

db4081ec934ddd9a7ce123b4d3cf6d6ea43a4537 · Keenan Nemetz · 4d ago · parent a32a859a

Sort the issue list by when it last moved

An issue queue is read for what changed, not for the order things were
filed. The list now shows the newest activity first and carries the columns
that answer the question: labels have their own column, assignees render like
authors do, and the creation time and author sit under the title.

The last column is "updated": the newest commit over the issue's directory,
which covers an edit, a comment, a label change, and a close or reopen. The
metadata branch has no such field on purpose — the commit carries the time —
so the index derives it from one `git log` per rebuild or one per refreshed
range, and stores it. An incremental refresh also reads the commits' paths, so
an edit reverted inside the range still counts as activity.

Bumps the index schema version, which drops the derived rows and rebuilds them
from the branch on the next read.

Closes #192

server/web/issues.go +6−1

@@ -57,11 +57,16 @@ func (w *Web) Issues(rw http.ResponseWriter, r *http.Request) {
57 57 w.serverError(rw, r, "cannot read issues: "+err.Error())
58 58 return
59 59 }
60 // Open first, then newest first within each state.
60 // Most recently updated first, so the list answers "what moved?" rather than
61 // "what was filed last?". When both states are shown the open issues stay on
62 // top: a closed issue somebody edited is not the queue the reader came for.
61 63 sort.SliceStable(rows, func(i, j int) bool {
62 64 if (rows[i].State == "open") != (rows[j].State == "open") {
63 65 return rows[i].State == "open"
64 66 }
67 if !rows[i].Updated.Equal(rows[j].Updated) {
68 return rows[i].Updated.After(rows[j].Updated)
69 }
65 70 return rows[i].ID > rows[j].ID
66 71 })
67 72 page, _ := strconv.Atoi(r.URL.Query().Get("page"))