Contacts: Issue with names during vCard import

Created on 21 Mar 2018  路  5Comments  路  Source: nextcloud/contacts

Steps to reproduce

  1. create a vCard that reads like this and save as contacts.vcf
VERSION:3.0
FN:Firstname Lastname
TEL;TYPE=CELL:+00 000 000000
UID:40d29812-40d3-402a-870c-dde33890aa7b
END:VCARD
  1. Import contacts.vcf using the web-based importer
  2. Try to sort the contacts by firstname or lastname and you will realise that the sorting is always done by the displayed name.

Expected behaviour

The contacts should be sorted according to what is set in the app [firstname/lastname/display]

Actual behaviour

Imported contacts are always sorted by display.

Web server: Nginx

Nextcloud version: 13.0.1

Contacts version: 2.1.2

I investigated the requests that get sent over the network during an import. The following happens.

The importer sends a vCard with the following content to ./remote.php/dav/addressbooks/users/[username]/Contacts/.

BEGIN:VCARD
VERSION:3.0
FN:Firstname Lastname
N:Lastname;Firstname;;;
TEL;TYPE=CELL:+00 000 000000
UID:c3f5fa69-2d65-4178-ac82-8376ae574077
END:VCARD

But when I now reload the contacts website the following response is returned by the endpoint ./remote.php/dav/addressbooks/users/[username]/Contacts/.

VERSION:3.0
FN:Firstname Lastname
TEL;TYPE=CELL:+00 000 000000
UID:40d29812-40d3-402a-870c-dde33890aa7b
END:VCARD

The difference is obvious, the N: entry is missing and not saved during import. This causes the sorting algorithm to default back to sorting by the FN: property.

If I go to the imported contact and select it, the following vCard is returned from the dav endpoint.

VERSION:3.0
FN:Firstname Lastname
N:Lastname;Firstname;;;
TEL;TYPE=CELL:+00 000 000000
UID:40d29812-40d3-402a-870c-dde33890aa7b
END:VCARD

Overall, this leads me to believe that the list functionality of the card dav endpoint omits the N: tag and only returns the FN: tag while requesting individual contacts return the full vCard including the FN: property.

duplicate

Most helpful comment

Sorting has been fixed in the next version! :)
See #505 a #511

All 5 comments

Sorting has been fixed in the next version! :)
See #505 a #511

@skjnldsv when's that coming out? :)

@AuspeXeu this week I hope ;)

@skjnldsv any update on the update? :D

Still waiting for our maintainer to push! :p

EDIT: @AuspeXeu new release available!
Sorry for the delay!

Was this page helpful?
0 / 5 - 0 ratings