#3666 Make the most recent flags appear at the top
Merged 2 years ago by pingou. Opened 2 years ago by pingou.

file modified
+5 -1
@@ -2234,7 +2234,11 @@ 


      pull_request = relation(


-         backref=backref("flags", cascade="delete, delete-orphan"),

+         backref=backref(

+             "flags",

+             order_by=str("(pull_request_flags.c.date_created).desc()"),

+             cascade="delete, delete-orphan"

+         ),




By inverting the order in which pull_request.flags returns the flags and
ensure this order is based on the date_created, we ensure that the most
recently added flags appear at the top when showing them on PRs, rather
than having them order by update date/time.

Fixes https://pagure.io/pagure/issue/3656

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

rebased onto f10b6f4

2 years ago

Pull-Request has been merged by pingou

2 years ago