Opened 14 years ago

Last modified 10 years ago

#5158 new enhancement

sort by last name acts like "sort by final displayed part"

Reported by: Owned by:
Milestone: Good ideas for later Component: None
Version: Severity: normal
Keywords: Cc:
Patch Status:


I sort by Status. Within each status group, sort alphabetically by last name. If name format is "First Middle Last" then this works just fine.

If name format is "Last, First Middle" then it actually sorts by first name, which happens to be displayed last. I'm not sure whether it sorts by middle name if there is one; it would be the same sort order in my browser.

To display "Last, First Middle" and sort by last name within status groups, I have to /uncheck/ sort by last name.

Change History (6)

comment:1 Changed 14 years ago by AndiJF

Resolution: wontfix
Status: newclosed

I don't think this is a bug. Adium is working as designed, but I believe the Contact sorting options are a bit misleading when they refer to sorting by first and last names.

Adium is *really* sorting by the words in the contacts' Alias entries. The Alias entry is just a string, and is not divided into separate data fields. Adium does not "know" which word is the last name, but simply assumes that the last word in the Alias string is the last name.

I've done some testing, and the results are as follows. If the user decides to fill out the Alias field in the format <lastname>, <firstname>, Adium has no way to "know" which part of the string is "really" the contact's last name, and will sort by first name, since it happens to be the last word in the string. If the user fills out the Alias <lastname>, <firstname> <middlename>, Adium will again pick up the last word in the string and sort by middle name.

I also tested importing a contact's details from the standard Apple Address Book. If I have an Address Book contact Bloggs, Fred with a Yahoo userID defined as fbloggs, and then create an Adium contact for that userID, Adium correctly picks up the <first> and <last> fields from Address Book, but builds the Alias string as Fred Bloggs. Adium "sort by last name" then picks up Bloggs.

I'm going to close this ticket since I don't believe this is a bug. Giving Adium the ability to store structured name fields would be an enhancement requiring some redesign. I suggest an enhancement request.

comment:2 Changed 14 years ago by Eric Richie

Milestone: Sometime after 1.0
Resolution: wontfix
Status: closedreopened
Type: defectenhancement

Turning it into an enhancement request.

comment:3 in reply to:  1 Changed 14 years ago by adium

I believe the issue is not with user-entered aliases, but when the information is being pulled from the address book. The bug occurs when, in advanced prefs under address book, Adium is set to display names as "Last, First". It then builds the display name from the address book as "Bloggs, Fred" and sorts based on the wrong name.

I'm working on a patch for this that changes AIListObject to store givenNames and lastName along with displayName. Those fields are populated from the address book and used only for sorting. User-entered aliases are treated as they currently are, by assuming the last name is the last token in the string. (Except when there is only one token, in which case it assumes it is a given name.) This would fix the bug in question and leave the door open to splitting up the Alias field in the future.


comment:4 Changed 14 years ago by adium

Er. Scratch that. Such a patch really does need to be done with a more complete rethinking of what "Sorting by Last Name" means with Aliases and Nicknames.

comment:5 Changed 12 years ago by Carlos Morales

comment:6 Changed 10 years ago by Robert

Owner: nobody deleted
Note: See TracTickets for help on using tickets.