Contacts does not support X-ABLabel field in remote address book entries - causes data loss while syncing
X-ABLabel field can be used to create custom labels in an contact. This is useful when none of the default labels really fit. For example, a contact for the emergency services can have labels such as Fire, Police, etc.
Such a contact is shown here, created in the Nextcloud Contacts web interface:
BEGIN:VCARD VERSION:3.0 PRODID:-//Sabre//Sabre VObject 4.1.6//EN UID:35dd880f-972e-4e56-846c-991839c43e96 REV;VALUE=DATE-AND-OR-TIME:20200603T133120Z FN:Emergency Services (Nextcloud) ADR;TYPE=HOME:;;;;;; EMAIL;TYPE=HOME: NEXTCLOUD1.TEL;TYPE="HOME,VOICE":110 NEXTCLOUD2.TEL;TYPE="HOME,VOICE":112 NEXTCLOUD3.TEL;TYPE="HOME,VOICE":113 ORG:Emergency Services (Nextcloud) NEXTCLOUD1.X-ABLABEL:Fire department NEXTCLOUD2.X-ABLABEL:Police NEXTCLOUD3.X-ABLABEL:Ambulance END:VCARD
You can do the same thing in Google Contacts:
BEGIN:VCARD VERSION:3.0 item1.TEL:110 item1.X-ABLabel:Fire dept item2.TEL:112 item2.X-ABLabel:Police item3.TEL:113 item3.X-ABLabel:Ambulance item4.ORG:Emergencies (Google) item4.X-ABLabel: CATEGORIES:myContacts END:VCARD
However, when synced to Evolution (using CardDAV protocol for Nextcloud and whatever a Google account in GOA uses), the informative labels are not shown, instead all the numbers are shown as generic Telephone entries:
Next, if I edit these contacts in Evolution, by adding an unrelated field such as a note, and sync it back to the server, the labels are lost.
In Nextcloud, they now show up as Select type:
In Google, they have become Other:
The labels are still there in the Nextcloud vCard, but they have been "disconnected" from the phone number entries, so they are for all practical purposes lost:
BEGIN:VCARD VERSION:3.0 UID:35dd880f-972e-4e56-846c-991839c43e96 X-EVOLUTION-FILE-AS:Emergency Services (Nextcloud) PRODID:-//Sabre//Sabre VObject 4.1.6//EN REV;VALUE="DATE-AND-OR-TIME":20200603T133120Z FN:Emergency Services (Nextcloud) ORG:Emergency Services (Nextcloud);; NEXTCLOUD1.X-ABLABEL:Fire department NEXTCLOUD2.X-ABLABEL:Police NEXTCLOUD3.X-ABLABEL:Ambulance NOTE:This is a note X-MOZILLA-HTML:FALSE TEL:110 TEL:112 TEL:113 END:VCARD
In the Google vCard, on the other hand, they labels are simply gone. Perhaps their sync server implementation detected that they were orphaned, and removed them. (It seems to have pruned other stuff as well, e.g.,
BEGIN:VCARD VERSION:3.0 FN:Emergencies (Google) N:(Google);Emergencies;;; TEL:110 TEL:112 TEL:113 item1.ORG:Emergencies (Google) item1.X-ABLabel:Other NOTE:Don't prank call! CATEGORIES:myContacts END:VCARD
evolution-3.36.2-1.fc32.x86_64.rpm on Fedora 32.