Bug 340316 - Custom field titles and field types not saved with vCard
Summary: Custom field titles and field types not saved with vCard
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kaddressbook
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-24 19:50 UTC by icepacks
Modified: 2017-01-08 00:20 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description icepacks 2014-10-24 19:50:14 UTC
Only the UUID key and value is saved with the vCard, so when imported back in you lose the title and field type.

For example...
Favorite Color: Blue (text)
Likes Carrots: [x] (boolean)
...imports back as...
c2547fb3-b58a-4290-bb4e-6cbc32ff2a33: Blue (text)
1d01a796-d646-4359-9094-ac448aaa4c80: true (text)

Reproducible: Always

Steps to Reproduce:
1. Create custom fields for a contact, using various types
2. Export vCard
3. Import vCard

Actual Results:  
Imported contact has custom fields with just the UUID as its title instead of the custom title, and type information is lost and the value always treated as text.

Expected Results:  
Custom field titles and type information retained on import because they get exported with the vCard.

Global custom field titles are retained because their titles are stored outside of the vCard. However, these also are lost if imported into a different KAddressBook install, etc.

Right now custom fields are stored like this...
X-KADDRESSBOOK-c2547fb3-b58a-4290-bb4e-6cbc32ff2a33:Blue
X-KADDRESSBOOK-1d01a796-d646-4359-9094-ac448aaa4c80:true

Maybe change it to something like this?...
X-KADDRESSBOOK-CF:text:c2547fb3-b58a-4290-bb4e-6cbc32ff2a33:Favorite Color:Blue
X-KADDRESSBOOK-CF:bool:1d01a796-d646-4359-9094-ac448aaa4c80:Likes Carrots:true
Comment 1 Thomas Hejze 2015-07-08 10:05:05 UTC
I use custom fields, too.
When I create a new contact, it contains none of the custom fields, although I made them global.
I have to create the new contact, then go to another contact, make the fields global again and switch back to the just created contact. Data type is always reset to text after the changes are submitted.
Comment 2 Denis Kurz 2016-09-24 20:53:23 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kaddressbook (version 5.0 or later, as part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 3 Thomas Hejze 2016-11-23 17:32:32 UTC
(In reply to Denis Kurz from comment #2)
> This bug has only been reported for versions before 4.14, which have been
> unsupported for at least two years now. Can anyone tell if this bug still
> present?
> 
> If noone confirms this bug for a Framework-based version of kaddressbook
> (version 5.0 or later, as part of KDE Applications 15.08 or later), it gets
> closed in about three months.

Confirmed for kdepim 4.14.10, the official version of OpenSuSE leap 42.1.
Comment 4 Denis Kurz 2017-01-08 00:20:43 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.

btw: Leap 42.2 leaps from 4.14 to a much more recent version.