Bug 342471 - only one photo is kept from multiple photos
Summary: only one photo is kept from multiple photos
Status: RESOLVED FIXED
Alias: None
Product: kaddressbook
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL: https://bugs.debian.org/773312
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-04 01:12 UTC by Sandro Knauß
Modified: 2015-02-04 13:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 14.12.3


Attachments
simple vcard with work and home image (583 bytes, text/vcard)
2015-01-11 10:42 UTC, chrysn
Details
with-image opended / modified / saved via evolution (917 bytes, text/vcard)
2015-01-11 10:43 UTC, chrysn
Details
with-image opened / modified / saved in kaddressbook (381 bytes, text/vcard)
2015-01-11 10:43 UTC, chrysn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sandro Knauß 2015-01-04 01:12:56 UTC
If a contact is  saved only one photo is kept from multiple photos.

Reproducible: Always
Comment 1 Laurent Montel 2015-01-05 06:19:16 UTC
How can we add multi photo in kaddressbook ?
Testcase ?
Comment 2 chrysn 2015-01-11 10:31:46 UTC
i've produced the attached test case by the following procedure (which produces the same error as using carddav; it's easier to reproduce like that, but actually matters more on carddav servers):

* on a local address book in evolution create a John Doe with work email address johndoe@example.com and private email address thejoe@freemail.example.com (version 3.12.9)
* export from evolution as from-evolution.vcf
* import to KAddressBook's Personal Contacts (version 4.14.2)
* export selected as vcard 3 with all fields exported (but not display name as full name) to unmodified-from-kaddressbook.vcf

the x-evolution-ui-slot attributes have been stripped from both email addresses.
Comment 3 chrysn 2015-01-11 10:42:44 UTC
Created attachment 90346 [details]
simple vcard with work and home image
Comment 4 chrysn 2015-01-11 10:43:17 UTC
Created attachment 90347 [details]
with-image opended / modified / saved via evolution
Comment 5 chrysn 2015-01-11 10:43:58 UTC
Created attachment 90348 [details]
with-image opened / modified / saved in kaddressbook
Comment 6 chrysn 2015-01-11 10:51:10 UTC
(sorry for the noise -- comment #2 should have gone to another bug, please ignore it here).

the first attachment with-image.vcf was hand-crafted to have distinct images for home and work -- i'm not aware of any software that routinely produces such vcards, but situations like that can happen when using different phone addressbook providers (carddavsync, davdroid and evolution).

evolution imo gets it right by showing only one image but preserving both, while kaddressbook just drops one of them.

i don't consider having two pictures a very strong use case, but it's symptom of kaddressbook currently not trying to preserve things in the vcard it doesn't understand.

(as with bug 342469, this is demonstrated here using local address books and import / export for ease of demonstration, but applies better to carddav address books).
Comment 7 Laurent Montel 2015-01-11 13:16:58 UTC
Ok for the moment "picture" class doesn't support multi photo.
I need to implement it.
Comment 8 Laurent Montel 2015-02-04 13:01:37 UTC
Git commit 5948a500879d9a63f29fc92ea5d6b8c7c144fd4d by Montel Laurent.
Committed on 04/02/2015 at 13:00.
Pushed by mlaurent into branch 'KDE/4.14'.

Fix Bug 342471 - only one photo is kept from multiple photos

vcard spec allow multi photo/sound/logo
FIXED-IN: 14.12.3

M  +56   -1    kabc/addressee.cpp
M  +10   -0    kabc/addressee.h
M  +1    -0    kabc/picture.h
M  +2    -0    kabc/sound.h
M  +32   -3    kabc/vcardtool.cpp

http://commits.kde.org/kdepimlibs/5948a500879d9a63f29fc92ea5d6b8c7c144fd4d