Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pgcommitfest/commitfest/templates/commitfest.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h3>{{p.is_open|yesno:"Active patches,Closed patches"}}</h3>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(6);">Stats</a>{%if sortkey == 6%}<div style="float:right;"><i class="bi bi-sort-numeric-down"></i></div>{%elif sortkey == -6%}<div style="float:right;"><i class="bi bi-sort-numeric-up"></i></div>{%endif%}</th>
<th>Author</th>
<th>Reviewers</th>
<th>Committer</th>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(9);">Committer</a>{%if sortkey == 9%}<div style="float:right;"><i class="bi bi-sort-alpha-down"></i></div>{%elif sortkey == -9%}<div style="float:right;"><i class="bi bi-sort-alpha-up"></i></div>{%endif%}</th>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(3);">Num cfs</a>{%if sortkey == 3%}<div style="float:right;"><i class="bi bi-sort-numeric-down-alt"></i></div>{%elif sortkey == -3%}<div style="float:right;"><i class="bi bi-sort-numeric-up-alt"></i></div>{%endif%}</th>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(2);">Latest mail</a>{%if sortkey == 2%}<div style="float:right;"><i class="bi bi-sort-down"></i></div>{%elif sortkey == -2%}<div style="float:right;"><i class="bi bi-sort-up"></i></div>{%endif%}</th>
{%if user.is_staff%}
Expand Down
12 changes: 12 additions & 0 deletions pgcommitfest/commitfest/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading