nextcloud / nextcloud/contacts

Contacts sort order not working or only working with detailed name.

Open
#4,985 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug feature: contacts
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.