Bug 212853 - Contact's email address not displayed properly is format is incorrect
Summary: Contact's email address not displayed properly is format is incorrect
Status: VERIFIED FIXED
Alias: None
Product: kaddressbook
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-03 02:56 UTC by Sabine Faure
Modified: 2009-11-05 17:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
2.1 vCard file used to test this bug (268 bytes, text/plain)
2009-11-04 18:17 UTC, Sabine Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sabine Faure 2009-11-03 02:56:35 UTC
Version:            (using Devel)
Compiler:          gcc 4.3.2 
OS:                Linux
Installed from:    Compiled sources

- Launch Kontact and go to KAB.
- Find a 2.1 Vcard file containing an email address (not one that you exported from KAB 0.1 - see bug #212852). 
- Open it in a word processor and check its version number to make sure.
- Go to File menu/Import/Import vCard...
- Select the 2.1 Vcard file
- Select an address book and click on 'Ok'
- The contact appears in the 'Name' column of the main view
- Click on it and the contact's information is displayed in the 3rd column.

However, the email is not displayed correctly.
From the 'Name Surname <email address>' format, the import has only kept the 'Name Surname' part whereas it should only have displayed the 'email address' part.

Trunk, Svn Rev 1043144
Comment 1 Tobias Koenig 2009-11-04 10:14:35 UTC
Hej Sabine,

can't reproduce it here, can you send me the vCard you used for
testing, please?

Ciao,
Tobias
Comment 2 Sabine Faure 2009-11-04 17:56:55 UTC
Sure please find the 2.1 Vcard I use to test this underneath.
I hope it will work for you since I modified the original name, address and email for confidentiality reason (This was a real contact of mine).

I am pretty sure that part of the pb is the email format in the .vcf file:
- If you open a 2.1 vCard in a word processor you can see that the format is EMAIL: Name Surname<email> like it used to be in 3.0 before it was modified.
- Whereas now for a 3.0 vCard the format is EMAIL: email

Trunk, Svn Rev 1044595
Comment 3 Sabine Faure 2009-11-04 18:17:47 UTC
Created attachment 38086 [details]
2.1 vCard file used to test this bug
Comment 4 Sabine Faure 2009-11-04 18:47:48 UTC
Sorry this test file does not seem to work at all now that I've modified it.

Interesting, I checked the rest of my personal contacts and there was only this one containing the Name Surname<email> format among them so I am pretty sure that I copied that format from an email 'To:' field and that's why its different.

So I am modifying this bug since it has nothing to do with importing a contact or the version number of a .vcf:

- Launch Kontact and go to KAB.
- Click on the 'New Contact button'
- Enter a name for the contact
- Enter an email using the following format: Name Surname<email>
- click on 'Ok' 
- The contact appears in the 'Name' column of the main view
- Click on it and the contact's information is displayed in the 3rd column.

However, the email is not displayed correctly.

- export the contact as a 3.0 vCard file
- Open it in a word processor and you can see that the email format is 'Name Surname<email>'.

From the 'Name Surname <email address>' format, the import has only kept the
'Name Surname' part whereas it should only have displayed the 'email address'
part.


Is it possible to do anything about this eventhough it comes from a user mistake?
I guess it could happen to other users.

Trunk, Svn Rev 1044595
Comment 5 Tobias Koenig 2009-11-04 20:24:31 UTC
SVN commit 1044852 by tokoe:

Use a stricter regexp to validate email addresses.

That prevents the user from inserting addresses that
includes the name of the person.

BUG: 212853


 M  +1 -1      emaileditwidget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1044852
Comment 6 Sabine Faure 2009-11-05 17:03:44 UTC
It is corrected now.

It is now impossible to type in or paste an email address with the following format: Name Surname<email>. 

Moreover, there cannot be any spaces in the email field.
This is to avoid display pb of the email.

Trunk, Svn Rev 1045165