After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 313221 - Import of vcards misses type information
Import of vcards misses type information
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
1.4.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: Milan Crha
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2005-08-11 12:35 UTC by Martin Felis
Modified: 2013-09-14 16:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample vcard with extended LABEL tag (419 bytes, text/x-vcard)
2005-08-12 10:33 UTC, Martin Felis
  Details
evolution proposed patch (2.12 KB, patch)
2007-05-07 14:09 UTC, Milan Crha
committed Details | Review
evolution-data-server proposed patch (3.46 KB, patch)
2007-05-07 14:15 UTC, Milan Crha
committed Details | Review

Description Martin Felis 2005-08-11 12:35:57 UTC
Please describe the problem:
When importing a vcard, the adresses are only taken, if the adress is listed 
as:
"LABEL;TYPE=<home|work>,<other tags>:<adress>"
e.g.
"LABEL;TYPE=home,postal,intl,parcel:5th Avenue 3" is accepted, while
"LABEL;TYPE=postal,intl,parcel,home:5th Avenue 3" is not accepted.
But those definitions of LABEL are allowed by RFC 2426

Steps to reproduce:
1. Take a vcard with with an adresse defined as above
2. Import it in evolution
3. 


Actual results:
The adress is not imported into evolution

Expected results:
I want that adress in the adress field of evolution

Does this happen every time?
Yes

Other information:
I love evolution!
Comment 1 Sushma Rai 2005-08-12 06:47:16 UTC
can you attach a sample vcard?
Comment 2 Sushma Rai 2005-08-12 06:48:36 UTC
can you attach a sample vcard?
Comment 3 Martin Felis 2005-08-12 10:33:57 UTC
Created attachment 50614 [details]
Sample vcard with extended LABEL tag

The listed adresses do not get imported. There is a problem with parsing the
listed TYPE information.
Comment 4 Ross Burton 2005-08-18 14:00:08 UTC
Moving out of NEEDINFO as vCard is attached.
Comment 5 Sushma Rai 2005-09-20 11:30:46 UTC
From IRC, another usecase

fdv: anybody familiar with how evolution handles vcards from the db files?
fdv: TEL;TYPE=HOME: and TEL;TYPE=WORK: are apparently not handled correctly in
     2.2.3. Is this fixed in later versions?
fdv: I synced my phone using multisync
fdv: and only cell phone numbers were mapped correctly
fdv: when I later edited the db file manually and changed TEL;TYPE=(HOME|WORK):
     to TEL;TYPE=(HOME|WORK);TYPE=VOICE;X-EVOLUTION-UI-SLOT=1:, 
     everything went fine
fdv: cell numbers apparently didn't need this extra info

Comment 6 Poornima 2006-06-15 10:07:08 UTC
importing of attached vcard did not import address fields.
Comment 7 Milan Crha 2007-05-07 14:09:21 UTC
Created attachment 87712 [details] [review]
evolution proposed patch
Comment 8 Milan Crha 2007-05-07 14:15:34 UTC
Created attachment 87714 [details] [review]
evolution-data-server proposed patch
Comment 9 Milan Crha 2007-05-07 14:19:49 UTC
Both patches contains changes where I added loops for testing all parameter values, not only first in the values list. (After calling of e_vcard_attribute_param_get_values function, but not everywhere.)

patches partially solve bug #427469
Comment 10 Srinivasa Ragavan 2007-05-09 04:31:59 UTC
(In reply to comment #9)
> Both patches contains changes where I added loops for testing all parameter

Im worried much about the performance hit here because of the loops in the lower level functions. It applies to the patches at bug #427468 also. 

Comment 11 Milan Crha 2007-05-09 08:18:48 UTC
I think here is no other correct solution for this, because one could have multiple values in one parameter, in any order, in the list and you need to test all of them when you're looking for exact value(s). Sorting values in such a way that evolution could understand it (like put HOME/WORK/OTHER TYPE values always as the first) is like a workaround, not a solution, I think.

Do you really think bug #427468? Some performance hit could be found in bug #427469 in comment #13 pat, with that testing for duplicities, that's right. I didn't found better place where to do this thing. (Maybe there could be same testing for duplicities when adding values to param.) Nevertheless, we may rather discuss this at bug #427469?
Comment 12 Ross Burton 2007-08-06 14:14:28 UTC
EDS part looks good.
Comment 13 Ross Burton 2007-08-06 14:17:53 UTC
Commit this aswell please.
Comment 14 Milan Crha 2007-08-06 15:07:49 UTC
e-d-s part committed to trunk. Committed revision 7924.
evo part committed to trunk. Committed revision 33960.