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 269342 - Automatic name split confuses palm sync
Automatic name split confuses palm sync
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Do Not Use
2.0.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: Veerapuram Varadhan
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2004-11-10 22:54 UTC by Paulo Jose da Silva e Silva
Modified: 2013-09-13 12:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for the address-conduit.c file to conform with pilot records name split. (894 bytes, patch)
2005-03-25 14:52 UTC, Paulo Jose da Silva e Silva
none Details | Review

Description Paulo Jose da Silva e Silva 2004-11-10 22:54:53 UTC
Description of Problem:

If I import my contacts from palm, evolution
builds the full names using the palm information.
After that it tries to automatically split the
name in last/first names (this appears in the
"File under" field. For some reason long names
like mine 

Paulo Jose da Silva e Silva

Are split like

da Silva e Silva, Paulo

And one or more middle names is lost. This
behavior is rather consistent. Long names become 

The last two last names, the very first name

The full name field (which is editable) remains
complete.

This creates problems for palm synchronization.
For example if I change my phone number in evo and
sync, the palm gets the new phone number but the
name in palm follows the splitted name above. That
is, it also loses the one of the middle names.

If after that I change another information, now
using the palm, and sync, evolution loses the
middle name information in the "full name" field too.

I also have the feeling that this confusion is
generating many duplications in my contact list
after sync. It may be related to bug#215724.

Steps to reproduce the problem:
1. Copy a palm contact from palm with a long name
(more than four names), using sync.
2. Change a value in evolution.
3.  Sync the contact again.

Actual Results:

Some middle names are lost and confusion is
generated in future sycs.

Expected Results:

No lost names.

How often does this happen? 

Always

Additional Information:

Palm: m105
My linux distribution: Ubuntu
Comment 1 Gerardo Marin 2004-11-11 20:46:03 UTC

*** This bug has been marked as a duplicate of 212305 ***
Comment 2 Paulo Jose da Silva e Silva 2004-11-12 00:47:45 UTC
I don't believe this bug is the same described in #12305. At least I
am sure that it is present in recent versions of Evolution: I am using
2.0.2 (from  Ubuntu). Moreover, at least in this version of the
software, there is no notion of "Middle name", as described in the
discussion of #12305. Hence, it can't be the reason for the bug.

The bug is very easily reproducible:

1) Clean up the contact database in evolution and in the palm.
2) Add a single contact in the palm with the name "Paulo Jose da Silva
e Silva" (it doesn't matter how you divide the name in the Palm).
3) Sync using "copy from pilot"

In evo you get a single contact that is filled under "da Silva e
Silva, Paulo". This is wrong (a middle name was lost). The full name
field is correct though. The only obvious fix is to manually edit the
"file under" field (which is boring for many contacts, errorprone, and
easy to forget). It seems like the algorithm that tries to guess the
value for the "filled under" entry do not know how to deal with long
names. 

This is a time bomb that can generate at least two bad side effects:

1) Middle names lost due to future changes
2) Duplicate entries in Evolution (but not in palm)
Comment 3 Paulo Jose da Silva e Silva 2005-03-25 14:52:55 UTC
Created attachment 45029 [details] [review]
Patch for the address-conduit.c file to conform with pilot records name split.
Comment 4 Paulo Jose da Silva e Silva 2005-03-25 14:53:38 UTC
Since Evo 2.2 is out and the bug is still there I have decided to use
my holiday to partially scratch my own itch. I have dig into Evolution
2.2.1.1 source code (I am using the source shipped with Ubuntu Hoary).

After quite some time I found the offending line, I am attaching a
simple patch that partially fixes the problem. 

In short. Evolution was trying to be smarter than the user. Instead of
accepting the name split suggested by the palm-pilot record. Evolution
join the name and calls its "western_name_parser" to split it back.
The end result is a split different from the original one they may
lead to problems like the duplicate entries I once saw.

My patch above simply accepts the name split in given and last name
from the palm. It does not try to touch it.

There is another problem I can forsee in the syncronization that I did
find how to fix. Imagine what happens in the other way around. You
have entered a new address in Evolution and you want to get it on the
palm. Imagine the name is:

Marie Ann Moss

Evolution splits the name automatically and the "Ann" ends in the
middle name field.

The conduit code gets the name joining the given and the family name
together, but that skips the middle name. In the end the new record
will have the name "Marie Moss". The "Ann" is gone.

I also tried to fix this, but I didn't find the "correct" fix. In my
mind the correct fix is to use as "first name" for the palm the given
name + middle name in the Evolution record. The last nome for the palm
should be the family name + suffix in the Evolution record. What
functions should I call to get strings representing the middle name
and the name suffix?

Another choice would be to ask the full name from the Evo record and
split it using the wertern_name_parser. This is nota a good idea, as
the syncronized record could loose the correct division from the
original version (think of a person with one first name and two last
names, this is the most usual in my country).

Finally, I have to comment that the mais problems is conceptual.
People names can not be "correctly" parsed, this is clear when we take
into account cultural differences. For example in France is common to
have two or three first names, in Brazil and Portugal two last names
are the rule, in the US only one.

As some people already set in bug#212305, IMHO Evolution concept of
middle name is broken in a multicultural setting. You should just drop
it (and probably drop the concept of suffixes two). Just keep first
and last name (which is a more usual division). If you want to split
the name automatically for convience just consider the very first name
the "first" and all the other the "last".

Comment 5 Veerapuram Varadhan 2005-12-20 14:08:02 UTC
Thanks for the report.  Can you try the patch in http://mail.gnome.org/archives/evolution-patches/2005-December/msg00097.html ?

Let me know the result.

Comment 6 Paulo Jose da Silva e Silva 2005-12-29 16:45:35 UTC
Hello,

It took me some time to get the new evolution to compile. At the end I used garnome for gnome 2.13.3.

The middle name is not lost anymore, this is good. However there are still some problems. Let me give an example:

1) Create a new address in Palm with

Last name: Medrano Silva
First name: Gabriel
email: gsilva@gmail.com

2) Syncronize palm and evolution

3) Edit the address in Evolution to add a home phone.

Result: The palm entry gets a duplicated e-mail entry (in the field other)
*and* the original last name/first name split is changed to

Last name: Silva
First name: Gabriel Medrano

(it forgets the original split). This change seems to be result of the 
automatic name split function in Evolution.

Why don't you drop the concept of middle name enterily (in Evolution it self)? It is very weird. For example, the name above would show as "Silva, Gabriel" unless I open the edit window to see the full name I never see the "Medrano". This is not natural, If I entered the guys full name, I want to see it full.
Comment 7 Devashish Sharma 2006-01-19 08:00:59 UTC
Moving to Conduits.
I think this cant be fixed.
You want the middle name to appear with the last name, somebody would like it to appear with the First name.

Given a name : A B C

u want it to be interpreted as 
Last name : B C
First name :A

we interpret it as
Last name : C
First name : A B

Just a matter of choice.
Comment 8 André Klapper 2006-08-22 09:27:50 UTC
paulo jose, is the behaviour described in comment #6 still the case for evolution 2.6.3?
guess we will not change this, as devashish already described. :-/
Comment 9 Paulo Jose da Silva e Silva 2006-12-27 17:23:44 UTC
Ops, it seems that the behavior got worse in Evolution 2.8.1 from Ubuntu edgy.

To reproduce it I did the following:

I deleted all the addresses in evolution and then I syncronized with palm to start with an empty address book.

I have them performed as in <a href=http://bugzilla.gnome.org/show_bug.cgi?id=269342#c6>comment #6</href>.

At the end, the address name entry entry in Palm got:

Last name: Silva
First name: Gabriel

Note that it not simply changed the name split, the syncronization lost one of the last names (the Medrano) in the palm entry! It also got the email as a duplicate entry in the e-mail and other field.

Please, add a gconf option the stop using this automatic name split. You don't need to expose it in the preferences dialog, only expose it to gconf-editor.

Comment 10 Veerapuram Varadhan 2007-08-23 12:09:38 UTC
Marking the attached patch as obsolete.  IMHO, automatic-handling-of-names can never make everyone happy. :-)
Comment 11 Matt Davey 2008-08-13 23:10:49 UTC
<slight_rant>
I think this is a clear example of Evolution trying to be too clever.  I can't see any reason why Evolution should not be able to maintain a firstname/lastname split that is explicitly supplied by the palm.  I think comment #4 gives a good example of bad behaviour and a fix (although patch is now obsolete).  The reply in comment #7 is breathtaking: "because evo takes your 'A, B C' and converts to 'A B C' and then re-breaks that up as 'A B, C' we can't maintain your existing 'A, B C' choice.".  Why bother attempting the cleverness of splitting 'A B C' when the user has already supplied you with the split?  Paulo actually went to the effort of showing how Evo could avoid messing this up!

I haven't looked at the code, but the whole magic of splitting up names has been apalling, in my opinion.  There are too many edge cases that Evo just doesn't handle well.  Double-barreled names are a good example, but Evo also screwed up a bunch of palm address where I'd appended comments to the surname: "Joe Bloggs (old friend from school)" for example.  This used to work just fine, back in the day!

</slight_rant>
Comment 12 Matt Davey 2008-10-05 20:09:31 UTC
It looks like the address_conduit name splitting behaviour was broken by svn revision 26202.

Previous to this, the conduit created a 'name' object that included given and family names, and set that in the e_contact.  However, it forgot to set the 'full_name'.  In 26202, this behaviour was changed to set ONLY the full_name, which ignored the pilot's split of given/family.

I'm currently working on a bunch of fixes for the address-conduit, so will try and fix this at the same time.
Comment 13 Paulo Jose da Silva e Silva 2008-10-06 16:37:53 UTC
That would be great! If you need any help with testing, don't hesitate to ask.

Paulo
Comment 14 Matt Davey 2008-10-06 16:46:43 UTC
Excellent timing, Paulo!
I've just created two patches (evo, e-d-s) against the 2.24 branch.  These were posted to the gnome-pilot-list here:
http://mail.gnome.org/archives/gnome-pilot-list/2008-October/msg00017.html

Any testing much appreciated.

Oh, I should add that I haven't modified the desktop --> palm conversion.  It will still ignore the middle name when writing to the palm.  The assumption is that if it is not a middle name you should click the button in the evo contact editor to explicitly set the first/last names.

It would be nice if Evo had an option to "please, please, never use a middle name!"
Comment 15 Matt Davey 2008-10-12 13:59:39 UTC
Reduced patch sent to bug 201167 that includes this fix plus category syncing.
Comment 16 Matt Davey 2009-01-07 17:26:18 UTC
This should now be fixed in HEAD, as per bug 201167.