Bug 325186

Summary: There is no way to merge contacts
Product: [Applications] kaddressbook Reporter: wjl
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: major CC: borden_c, chris.kerr, jjm, tokoe
Priority: NOR    
Version: 4.10.5   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description wjl 2013-09-22 23:41:21 UTC
KAddressBook in a previous version used to be able to merge contacts. The new version does not have any way to do this.

Two contacts cannot even be merged manually in any easy way, because only one contact's details can be displayed and/or edited at a time. So the only way to do it in KAddressBook is to either print one contact our and re-enter the info from paper while doing a manual merge, or by juggling the contact editor window open and closed over and over many times for each piece of information.

Currently, the fastest way I have found to merge contacts is to export as vCard, merge with a different program, then delete everything in KAddressBook and reimport the externally merged vCards. This is suboptimal to say the least!

Reproducible: Always

Steps to Reproduce:
1. Create a lot of contacts with names, multiple e-mail addresses, and IM information  (e.g. imported from an e-mail program).
2. Create a lot more contacts about mostly the same people, but this time with just names, phone numbers, and mailing address (e.g. imported from another address book application) 
3. Look for an automatic "find and merge" and don't find it.
4. Try to highlight two contacts and manually select "merge", but see there is no such feature.
5. Attempt to merge them by hand.
6. (Do this for at least 100 contacts before saying this is no big deal.)
Actual Results:  
There is no feasible way to merge contacts, even by hand. It's easier to use another program, or even just edit the raw vCards with a text editor.

Expected Results:  
KAddressBook should have at least a way to highlight some contacts and hit "Merge", which lets you interactive resolve conflicts. Even better would be a smarter "find and merge" which asks the user if this should be done all fuzzy matches based on existing names or data.

Kontact is a top-of-the-line program in many respects, but KAddressBook not handling contact merges well (or really at all) is a disincentive to the import of a bunch of contact information into the program.
Comment 1 Chris Kerr 2013-10-21 08:08:56 UTC
In addition, it would be nice if the merged contact "remembers" in some way the IDs of the contacts that were merged to form it, so I don't have to merge again the next time I import updated contacts from my phone to kaddressbook.
Comment 2 Laurent Montel 2013-11-16 13:50:25 UTC
Git commit 10b6d9802a6ba63dd962390285c35bc68c9f6d02 by Montel Laurent.
Committed on 16/11/2013 at 13:49.
Pushed by mlaurent into branch 'master'.

Continue to implement merge contacts
Related: bug 241386, bug 242647

M  +7    -1    kaddressbook/CMakeLists.txt
R  +0    -0    kaddressbook/merge/mergecontacts.cpp [from: kaddressbook/mergecontacts.cpp - 100% similarity]
C  +0    -0    kaddressbook/merge/mergecontacts.h [from: kaddressbook/mergecontacts.h - 100% similarity]
A  +52   -0    kaddressbook/merge/mergecontactsdialog.cpp     [License: GPL (v2)]
C  +13   -8    kaddressbook/merge/mergecontactsdialog.h [from: kaddressbook/mergecontacts.h - 071% similarity]
A  +52   -0    kaddressbook/merge/searchduplicatecontactdialog.cpp     [License: GPL (v2)]
R  +12   -8    kaddressbook/merge/searchduplicatecontactdialog.h [from: kaddressbook/mergecontacts.h - 067% similarity]

http://commits.kde.org/kdepim/10b6d9802a6ba63dd962390285c35bc68c9f6d02
Comment 3 Laurent Montel 2015-02-16 12:56:07 UTC
Git commit 2f0f1aafb9b4f84751fd838c9177c4fc2748e307 by Montel Laurent.
Committed on 16/02/2015 at 12:23.
Pushed by mlaurent into branch 'KDE/4.14'.

Fix Bug 325186 - There is no way to merge contacts
Related: bug 241386, bug 242647

M  +22   -0    kaddressbook/merge/manualmerge/mergecontactsdialog.cpp
M  +6    -1    kaddressbook/merge/manualmerge/mergecontactsdialog.h
M  +19   -38   kaddressbook/merge/manualmerge/mergecontactwidget.cpp
M  +6    -1    kaddressbook/merge/manualmerge/mergecontactwidget.h
M  +2    -1    kaddressbook/merge/tests/mergecontactsdialogtest.cpp

http://commits.kde.org/kdepim/2f0f1aafb9b4f84751fd838c9177c4fc2748e307
Comment 4 Borden 2015-03-12 22:13:58 UTC
May God bless and keep all those who worked and fixed this bug. May your lives be accomplished and fulfilled and your harvests bountiful.

(Seriously, thank you very much for tackling this)