contacts.vcfVERSION:3.0
FN:Firstname Lastname
TEL;TYPE=CELL:+00 000 000000
UID:40d29812-40d3-402a-870c-dde33890aa7b
END:VCARD
contacts.vcf using the web-based importerThe contacts should be sorted according to what is set in the app [firstname/lastname/display]
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.
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!
Most helpful comment
Sorting has been fixed in the next version! :)
See #505 a #511