Skip to content

Commit 0922c6c

Browse files
committed
Added ordering by name to group personnel lists in edit and about views. This ordering is by the person's profile name, without attempting to determine which name part is family name or given name. Fixes ietf-tools#2184.
- Legacy-Id: 12817
1 parent 761ed8a commit 0922c6c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/group/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def fill_in_charter_info(group, include_drafts=False):
7979
group.areadirector = getattr(group.ad_role(),'email',None)
8080

8181
personnel = {}
82-
for r in Role.objects.filter(group=group).select_related("email", "person", "name"):
82+
for r in Role.objects.filter(group=group).order_by('person__name').select_related("email", "person", "name"):
8383
if r.name_id not in personnel:
8484
personnel[r.name_id] = []
8585
personnel[r.name_id].append(r)

ietf/group/views_edit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def diff(attr, name):
380380
)
381381

382382
for slug in roles_for_group_type(group_type):
383-
init[slug + "_roles"] = Email.objects.filter(role__group=group, role__name=slug)
383+
init[slug + "_roles"] = Email.objects.filter(role__group=group, role__name=slug).order_by('role__person__name')
384384
else:
385385
init = dict(ad=request.user.person.id if group_type == "wg" and has_role(request.user, "Area Director") else None,
386386
)

0 commit comments

Comments
 (0)