diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2020-05-10 11:23:16 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-05-10 11:23:16 +0200 |
commit | f47e75e5665431f146c0440f4d2fb5115c5554c9 (patch) | |
tree | 6681a267c3e730f8502b09050ff134b2d7f1d6a1 | |
parent | 3c07337a1f7d2091ce22abca99abb5eef3cb5a5a (diff) |
Display list of forgotten issues.
* mumi/messages.scm (forgotten-issues): New procedure.
* mumi/web/controller.scm (controller): Handle /forgotten URL.
* mumi/web/view/html.scm (list-of-forgotten-issues): New procedure.
(index): Show top 10 forgotten issues.
-rw-r--r-- | mumi/messages.scm | 9 | ||||
-rw-r--r-- | mumi/web/controller.scm | 2 | ||||
-rw-r--r-- | mumi/web/view/html.scm | 34 |
3 files changed, 44 insertions, 1 deletions
diff --git a/mumi/messages.scm b/mumi/messages.scm index bc87a4e..1f26535 100644 --- a/mumi/messages.scm +++ b/mumi/messages.scm @@ -39,6 +39,7 @@ #:export (search-bugs fetch-bug recent-bugs + forgotten-issues easy-bugs wishlist-bugs bugs-by-severity @@ -205,6 +206,14 @@ Intersect the result with the id sets in the list SETS." (min amount (length recent-ids))))) (status-with-cache ids))) +(define (forgotten-issues amount) + "Return up to AMOUNT issues that appear to have been forgotten +about." + (let* ((forgotten-ids (forgotten-bug-numbers (%config 'packages))) + (ids (take (reverse forgotten-ids) + (min amount (length forgotten-ids))))) + (status-with-cache ids))) + (define (easy-bugs) "Return all bugs that have been tagged \"easy\"." (let ((ids (db:bugs-by-tag "easy"))) diff --git a/mumi/web/controller.scm b/mumi/web/controller.scm index 160cfae..ca04f1b 100644 --- a/mumi/web/controller.scm +++ b/mumi/web/controller.scm @@ -60,6 +60,8 @@ (render-html (list-of-matching-bugs "tag:easy" (easy-bugs)))) (('GET "recent") (render-html (list-of-recent-issues))) + (('GET "forgotten") + (render-html (list-of-forgotten-issues))) (('GET "wishlist") (render-html (list-of-matching-bugs "severity:wishlist is:open" diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm index 3c7fd0e..81524f4 100644 --- a/mumi/web/view/html.scm +++ b/mumi/web/view/html.scm @@ -32,7 +32,8 @@ error-page issue-page list-of-matching-bugs - list-of-recent-issues)) + list-of-recent-issues + list-of-forgotten-issues)) (define (bug-subject* bug) (or (bug-subject bug) "(no subject)")) @@ -210,6 +211,19 @@ simple query language. Here is a list of supported query terms:") (tbody ,@(list-of-bugs (recent-bugs 10)))) + (div (@ (class "mt-4 h4")) "Forgotten issues " + (small (a (@ (href "forgotten")) "(More)"))) + (table + (@ (class "table table-borderless table-hover js-sort-table")) + (thead + (tr (@ (class "heading")) + (th (@ (class "js-sort-number")) "ID") + (th "Subject") + (th "Date submitted") + (th "Status"))) + (tbody + ,@(list-of-bugs (forgotten-issues 10)))) + (div (@ (class "mt-4 h4")) "Priority bugs") (table (@ (class "table table-borderless table-hover js-sort-table")) @@ -633,6 +647,24 @@ m1 3H6v5h2V4zm0 6H6v2h2v-2z"))))) (tbody ,@(list-of-bugs (recent-bugs max)))))))) +(define* (list-of-forgotten-issues #:optional (max 100)) + (layout + #:body + `(,(header #:search-bar? #f) + (div + (@ (class "container")) + (h1 "Forgotten issues") + (table + (@ (class "table table-borderless table-hover js-sort-table")) + (thead + (tr (@ (class "heading")) + (th (@ (class "js-sort-number")) "ID") + (th "Subject") + (th "Date submitted") + (th "Status"))) + (tbody + ,@(list-of-bugs (forgotten-issues max)))))))) + (define (list-of-matching-bugs query bugs) (layout #:body |