diff --git a/pgcommitfest/commitfest/templates/commitfest.html b/pgcommitfest/commitfest/templates/commitfest.html index 2e71784b..2549d2d5 100644 --- a/pgcommitfest/commitfest/templates/commitfest.html +++ b/pgcommitfest/commitfest/templates/commitfest.html @@ -41,7 +41,7 @@

{{p.is_open|yesno:"Active patches,Closed patches"}}

Stats{%if sortkey == 6%}
{%elif sortkey == -6%}
{%endif%} Author Reviewers - Committer + Committer{%if sortkey == 9%}
{%elif sortkey == -9%}
{%endif%} Num cfs{%if sortkey == 3%}
{%elif sortkey == -3%}
{%endif%} Latest mail{%if sortkey == 2%}
{%elif sortkey == -2%}
{%endif%} {%if user.is_staff%} diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py index 34553217..38bb2f0f 100644 --- a/pgcommitfest/commitfest/views.py +++ b/pgcommitfest/commitfest/views.py @@ -507,6 +507,18 @@ def patchlist(request, cf, personalized=False): orderby_str = "poc.commitfest_id, lastmail DESC" elif sortkey == -8: orderby_str = "poc.commitfest_id DESC, lastmail" + elif sortkey == 9 and not personalized: + # PostgreSQL sorts NULLs last when ascending and first when + # descending, so patches without a committer end up at the bottom in + # this order and at the top in the reverse one. + orderby_str = ( + "committer.last_name, committer.first_name, committer.username, p.id" + ) + elif sortkey == -9 and not personalized: + orderby_str = ( + "committer.last_name DESC, committer.first_name DESC, " + "committer.username DESC, p.id DESC" + ) else: if personalized: # First we sort by group_name, to have the grouping work.