Skip to content

Commit d9a2b88

Browse files
committed
Change sort order for reviewers/authors in filter dropdown
Previously it was sorted by last name, which did not always make sense. Canged to sort by first name, which hopefully makes more sense. Per request from Alvaro Herrera and others.
1 parent 535af6e commit d9a2b88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pgcommitfest/commitfest/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self, cf, *args, **kwargs):
2828
self.fields['status'] = forms.ChoiceField(choices=c, required=False)
2929

3030
q = Q(patch_author__commitfests=cf) | Q(patch_reviewer__commitfests=cf)
31-
userchoices = [(-1, '* All'), (-2, '* None'), (-3, '* Yourself') ] + [(u.id, '%s %s (%s)' % (u.first_name, u.last_name, u.username)) for u in User.objects.filter(q).distinct().order_by('last_name', 'first_name')]
31+
userchoices = [(-1, '* All'), (-2, '* None'), (-3, '* Yourself') ] + [(u.id, '%s %s (%s)' % (u.first_name, u.last_name, u.username)) for u in User.objects.filter(q).distinct().order_by('first_name', 'last_name')]
3232
self.fields['author'] = forms.ChoiceField(choices=userchoices, required=False)
3333
self.fields['reviewer'] = forms.ChoiceField(choices=userchoices, required=False)
3434

0 commit comments

Comments
 (0)