Open Bug 2008735 Opened 10 months ago Updated 4 months ago

mail.addr_book.displayName.lastnamefirst preference is ignored for CardDAV address books

Categories

(Thunderbird :: Address Book, defect)

Thunderbird 146
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: branislav.klocok, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0

Steps to reproduce:

  1. Set mail.addr_book.displayName.lastnamefirst to any of 0,1,2 in about:config
  2. Ensure mail.addr_book.displayName.autoGeneration is true
  3. Create a new contact in a CardDAV address book (e.g., IceWarp, Nextcloud, etc.)
  4. Enter First Name: "John" and Last Name: "Doe"
  5. Observe the auto-generated Display Name

Actual results:

Display Name is always generated as "Doe John" regardless of the lastnamefirst preference value.

Expected results:

Display Name should be generated as "Doe John" "John Doe"...... (respecting the lastnamefirst=0,1,2 setting

Enhancement Request:
Additionally, it would be very useful to have a configurable display name format template, allowing users to include other fields like Organization and Nickname. For example:

  • {{LastName}}, {{FirstName}} ({{Organization}}) - {{NickName}}

Right, seems the logic from https://searchfox.org/comm-central/rev/5141bbb85d078073897c4e5769a07672198aa6e6/mail/components/addrbook/content/vcard-edit/edit.mjs#250 should be moved into buildDefaultName()
Doesn't seem limited to CardDAV.

Gentle ping — this is still reproducible on current Thunderbird (150.0.1). The mail.addr_book.displayName.lastnamefirst preference continues to be ignored when the display name is auto-generated; the name is always built as "Lastname Firstname" regardless of the 0/1/2 setting.

Per comment 4, moving the logic from vcard-edit/edit.mjs into buildDefaultName() sounds like the right fix, and since it isn't CardDAV-specific this would also cover local address books. Could this be confirmed (UNCONFIRMED → NEW)?

Happy to test a patch on Linux against IceWarp/Nextcloud CardDAV and local address books if that helps.

You need to log in before you can comment on or make changes to this bug.