Bug 313336 - Akonadi Google resource does not synchronize custom (date) fields
Summary: Akonadi Google resource does not synchronize custom (date) fields
Alias: None
Product: libkgapi
Classification: Unclassified
Component: contacts (show other bugs)
Version: 0.4.2
Platform: Archlinux Packages Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: Daniel Vrátil
Depends on:
Reported: 2013-01-16 00:43 UTC by Karol Slanina
Modified: 2013-01-16 13:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 0.4.5


Note You need to log in before you can comment on or make changes to this bug.
Description Karol Slanina 2013-01-16 00:43:14 UTC
Akonadi google resource only synchronizes contact birthdays and anniversaries.
There are countries in which namedays are equally important as birthdays. Namedays can only be defined as custom date fields but are currently not synchronized with KDE.

I have written a simple plasmoid (BirthdayList) to provide a sorted list of coming birthdays and namedays, but the nameday functionality is currently limited with Google resource - namedays can only be determined out of the given names, which is not always reliable. Therefore I would greatly appreciate if the Google resource added the support for custom date fields.
Comment 1 Daniel Vrátil 2013-01-16 01:27:44 UTC
The vCard standard (RFC 6350) specifies only how to store birthday, nothing about namedays. We could store it as a KDE-specific extension to vCard (X-KDE-NameDay or something), but in order for this to make any sense, it should be supported by KABC::Addressee and by KAddressbook.
Comment 2 Karol Slanina 2013-01-16 07:51:33 UTC
Addressbook and KABC::Addressee do support such custom fields (at least in local vcard-based collections such as Personal Contacts or old KDE Address Book).

You can add a custom date field, e.g. Nameday in the 'Custom Fields' tab. Kaddressbook asks for the name, key and value of the given field. By default some random-generated UUID is provided as the key, but it can be changed to be the same as the name. In the vcard file, the custom field is stored as follows:
"X-KADDRESSBOOK-<key>:2000-05-20", e.g. "X-KADDRESSBOOK-Nameday:2000-05-20"

KABC::Addressee supports such fields, you can get them by calling
kabcAddressee.custom("KADDRESSBOOK", key);
and they are also provided in the stringlist provided by kabcAddressee.customs().

By the way, in a similar way also anniversaries are supported. As a custom field key, "X-Anniversary" is used, both in the vcard file as well as in the kabcAddressee.custom(). This way it works even in the Akonadi Google resource.
Comment 3 Daniel Vrátil 2013-01-16 13:11:39 UTC
Git commit 184a3eddcbfbc9610cdae586fbd028bd71f00326 by Dan Vrátil.
Committed on 16/01/2013 at 14:04.
Pushed by dvratil into branch 'LibKGAPI/0.4'.

Display gContact$userDefinedField in KAddressbook
FIXED-IN: 0.4.5

M  +5    -2    libkgapi/services/contacts.cpp