Bug 320022 - kaddressbook silently loses vCard entries when UID is not unique
Summary: kaddressbook silently loses vCard entries when UID is not unique
Status: RESOLVED FIXED
Alias: None
Product: kaddressbook
Classification: Applications
Component: general (show other bugs)
Version: 4.10
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-19 18:08 UTC by Thomas Bleher
Modified: 2013-12-15 14:38 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test vcard file containung two names with duplicate uids (178 bytes, text/vcard)
2013-12-07 09:41 UTC, Thomas Bleher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bleher 2013-05-19 18:08:09 UTC
I recently tried to load a vCard file where several addresses had an identical UID. KAddressBook seemed to load the file just fine, but several entries were missing. It turned out that the missing entries had a duplicated UID with another field.

I know that this is an error in the file, but it would be very helpful if KAddressBook noticed this error, and printed an appropriate message.

Background: I regularly export my data from KAddressBook via a small script: https://github.com/tbleher/vcard-tools/blob/master/akonadi-to-vcard
I recently tried to re-import the generated vCard file on another computer, and noticed the error there. Apparently, duplicate UIDs are stored in the Akonadi database itself (as far as I could see, when an entry is copied). Now I don't know if this is a bug (because I don't know the internal akonadi format), and certainly the way the script accesses the data is not officially supported, but I thought the issue would still be worth mentioning.

I often export my data

Reproducible: Always

Steps to Reproduce:
1. Load vCard file which contain several entries, where some entries contain duplicate UID

Actual Results:  
Some addresses are missing

Expected Results:  
All addresses are there, or a warning is generated
Comment 1 Laurent Montel 2013-12-06 06:03:30 UTC
could you provide a test case please ?
Comment 2 Thomas Bleher 2013-12-07 09:39:36 UTC
I couldn't reproduce the issue on 4.11.2, so I assume the issue is already fixed.
Comment 3 Thomas Bleher 2013-12-07 09:41:28 UTC
Created attachment 83966 [details]
Test vcard file containung two names with duplicate uids
Comment 4 Christoph Feck 2013-12-15 01:01:00 UTC
Thomas, does the attachment from comment #3 indicate you could still reproduce, in other words, does this need to be reopened?
Comment 5 Thomas Bleher 2013-12-15 14:38:49 UTC
No, this is just the test case I created in response to comment #1. While testing with this file I noticed that I couldn't reproduce the issue anymore. I still uploaded it in case others want to have a look at it.