recent-bugs: Include recently submitted bugs.
authorRicardo Wurmus <rekado@elephly.net>
Fri, 7 Sep 2018 09:53:29 +0000 (11:53 +0200)
committerRicardo Wurmus <rekado@elephly.net>
Fri, 7 Sep 2018 09:53:29 +0000 (11:53 +0200)
mumi/messages.scm

index b5a98a3..d24de85 100644 (file)
@@ -342,7 +342,7 @@ we have to do this in a very convoluted way."
   ;; "search-est" does not return unique items, so we have to take
   ;; more and then filter the results.  To allow for caching we round
   ;; off the current time to the start of the hour.
-  (let* ((matches
+  (let* ((matches-activity
           (soap-invoke* (%config 'debbugs)
                         search-est
                         ""
@@ -350,10 +350,18 @@ we have to do this in a very convoluted way."
                         #:attributes
                         `((package string-prefix "guix")
                           (@cdate >= ,(time-second (ago 'months 1))))))
+         (matches-new
+          (soap-invoke* (%config 'debbugs)
+                        search-est
+                        ""
+                        #:max 50
+                        #:attributes
+                        `((package string-prefix "guix")
+                          (date >= ,(time-second (ago 'months 1))))))
          (unique (delete-duplicates
                   (filter-map (lambda (item)
                                 (assoc-ref item "id"))
-                              matches)))
+                              (append matches-new matches-activity))))
          (ids (take unique (min amount (length unique)))))
     (soap-invoke* (%config 'debbugs) get-status ids)))