I'm using a VCard Directory resource to store contacts. The only way that I have found to create a contact group (aka distribution list) there is to start to compose a message in KMail, add the contact email addresses and then use the "Save List" button (that appears when there are 2 or more of them) to save the list. After doing this, the contact group indeed appears in KAddressBook but each contact that it contains is duplicated. The duplicate contacts contain only the name and the email address, regardless of any other data that the original contact contained. Reproducible: Always Steps to Reproduce: 1. Start with an address book containing contact name/emails (plus any additional information) such as: Foo Bar foo.bar@some.where Name Surname email2@another.com 2. In KMail, open a new composer window (kmail --composer). 3. Click "Select..." and pick each of those contacts in turn, then "Add as To". Close the picker. 4. Click "Save List...", enter a name for the list and pick the original address book to add to. 5. In KAddressBook, observe that two duplicates of "Foo Bar" and "Name Surname" have appeared in the list. Each one contains only their name and the selected email address (if they had more than one). Actual Results: Duplicate contacts added as above. Two VCF files with UIDs of the form {a04f7731-c090-45af-a05d-7119d3e03cda} will have appeared in the VCard Directory directory. An Akonadi item of the form: ID MIME type Size Modification Time 10103 application/x-vnd.kde.contactgroup 205 B Wed Sep 25 14:40:25 2013 UTC with payload: <?xml version="1.0" encoding="UTF-8"?> <contactGroup uid="{e1df8759-4f15-49f8-99a7-2751f67f8530}" name="test2-list"> <contactReference uid="10101"/> <contactReference uid="10102"/> </contactGroup> will have been added to the database. Expected Results: Creating a group from existing contacts should reference them, not duplicate anything. I'm not sure where this bug really lies; it may be in KMail, akonadi or kaddressbook. Since it can be duplicated via the KMail composer GUI, I'm initially reporting it in that category.
If it is relevant, I do not have Nepomuk PIM data indexing enabled.
https://git.reviewboard.kde.org/r/113180/
Git commit 9b2498f5447f968fac834c6df70a7e60b450c361 by Jonathan Marten. Committed on 14/10/2013 at 15:25. Pushed by marten into branch 'master'. kmail: do not duplicate contacts when saving distribution list Save a known contact by reference to its Akonadi ID plus possibly email address (if it is not the preferrred one). Only save an unknown contact by name and email, do not add it to the address book. Correctly handle the case where the email search returns multiple contacts. REVIEW:113180 M +51 -28 messagecomposer/recipient/distributionlistdialog.cpp http://commits.kde.org/kdepim/9b2498f5447f968fac834c6df70a7e60b450c361