nextcloud / nextcloud/contacts
Contacts sort order not working or only working with detailed name.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 642
- Forks
- 220
- Avg merge
- 14h 39m
- Merged PRs (30d)
- 51
Description
Describe the bug
Add a contact -> Type in name "John Shaft" -> Save -> Change settings "sort contacts by last name" -> Contact turns up as "John Shaft" not "Shaft, John".
Works properly only if "detailed name" is added to the contact.
I don't think it's a great idea to only have a single name field exposed in the UI in the first place.
But If you want to keep this at least make it work properly so that sort order adjustments do not "silently" fail! For example, add some intelligence so that it splits up things that you enter there into first and last name if it is only two words.
Also I have no clear mental mondel, as probably most users, what happens if that singular name field is different from the detailed name field.
Steps to reproduce
Add a contact -> Type in name "John Shaft" -> Save -> Change settings "sort contacts by last name" -> Contact turns up as "John Shaft" not "Shaft, John".
Expected behavior
Contact turns up properly sorted.
Actual behavior
No effect of sort order.
Contact version
8.1.2
Operating system
Linux
PHP engine version
None
Web server
None
Database
None
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in Contacts 8.1.2 on Linux: create a contact with only "John Shaft" in the name field, enable sorting by last name, and compare it with a contact using the detailed name field. Trace how the two name fields are interpreted and how the sort setting is applied. Done means the single-field contact follows the selected last-name order without silently failing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100