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 523775 - Order of Email Addresses in UI is broken
Order of Email Addresses in UI is broken
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Contacts
2.22.x (obsolete)
Other Linux
: Normal major
: ---
Assigned To: Milan Crha
Evolution QA team
: 587382 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-22 01:49 UTC by Karsten Bräckelmann
Modified: 2010-05-19 09:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed evo patch (11.69 KB, patch)
2008-09-22 20:26 UTC, Milan Crha
none Details | Review
evo patch ][ (6.96 KB, patch)
2010-05-19 09:30 UTC, Milan Crha
committed Details | Review

Description Karsten Bräckelmann 2008-03-22 01:49:16 UTC
The Order Evo picks up the email addresses is broken.

The "Email" column in list view displays the border right one first. The intuitive order would be to use the top left one first. This is after all, the first field a user enters an address, and tabbing through the fields suggest this order, order. Also, this is how previous versions actually did it.

A contact previously entered with Evo 2.6 will display the address "foo" in the top left field, AND in the Email column, even if there are more addresses.

A contact entered in 2.22 will attempt the revers order to pick the address to show in the Email column.


Same holds for the preview pane, same broken order.

Also, the logic is reversed just like this for phone numbers.


This is a regression, and seriously counter-intuitive behavior.
Comment 1 Karsten Bräckelmann 2008-03-22 02:09:45 UTC
Card View uses the very same reverse order.  This most likely is an issue with the Contact editor design.
Comment 2 Karsten Bräckelmann 2008-03-22 02:59:07 UTC
FWIW, the displayed order is  4, 2, 3, 1  in tab order in the UI...
Comment 3 Milan Crha 2008-09-22 20:26:47 UTC
Created attachment 119195 [details] [review]
proposed evo patch

for evolution;

nothing much to say about this patch, it should just work. Oh, one thing anyway, resave your contacts within the UI, otherwise you'll see not change.
Comment 4 John Keller 2008-12-07 23:54:34 UTC
This is incredibly annoying, especially since I've taken care over the years and upgrades to keep my contacts' data in order of their preferred contact info. I can't understand how this got through testing, much less to two released versions. I wish I hadn't upgraded (I was using Evo 2.18).

I'm not sure that the patch in comment 3 is the real solution. Looking at it (I didn't apply it), it seems to simply reverse the display order.

However, the real bug is that for old contacts (pre-regression), the email addresses are in the right order (A, B, C). Contacts modified in Evo with the regression subsequently display them in reverse order (C, B, A). However, there seems to be no way to tell which is the "correct" order (i.e. to know if Evo has stored items in A, B, C order or C, B, A order).

This isn't simply a display problem - the data itself has been stored in reverse order. This can be shown by looking at e.g. the address shown in the email column of the list view, and the email addresses shown for each contact in the preview pane.

Also, I have some programs which use Perl's Text::vCard, and they see the same order reversal. The order is reversed only for recently modified/created contacts.

Anyone from Evo team ready to look into making the correct fix for this?
Comment 5 Milan Crha 2009-06-30 08:11:42 UTC
*** Bug 587382 has been marked as a duplicate of this bug. ***
Comment 6 Chenthill P 2010-02-22 10:43:55 UTC
Milan, any updates on this?
Comment 7 Milan Crha 2010-02-22 11:08:02 UTC
(In reply to comment #6)
> Milan, any updates on this?

Nope, because there is a different approach in bug #556061. These two bugs are very similar, only each of them is fixing it in its own way
(see bug #556061 comment 8 there).
Comment 8 John Keller 2010-02-22 11:12:50 UTC
FYI, the proposed patch is NOT the correct way to fix this bug. The patch assumes that the order is simply reversed; this is not the case.

Old versions of Evo stored items in order (field A = first item; field B = second item; ...). Newer versions of Evo store in a reversed order AND include an index among the "types" of vCard info.

Entries from old versions of Evo are still stored in ascending order, but the index type is added to them. Contacts created *or* edited (even if the edit doesn't touch the email addresses or phone numbers) store their entries in reverse order and of course with the index type.

The correct fix is to sort on the index "type" of a vCard, and then fall back to unsorted (e.g. stored order) if the index doesn't exist.


Note that this sort order needs to apply to phone numbers as well as email addresses, if my memory serves correct. So the bugfixer should at least make sure both behave the same way.

This may involve applying a variation of the patch to the two spots, but I suspect that the phone numbers have already been fixed for some time time and that the fix for email simply needs to be taken from the phone part of code. (But I haven't read the code, so you'll need to decide that for yourselves.)


Finally, please note that this fix ALSO needs to be applied to the "Email 1", "Email 2", "Email 3" in the list view AND also in the "contact preview" below it. Email addresses are currently incorrectly sorted in those two places, as well.
Comment 9 Milan Crha 2010-05-19 09:30:26 UTC
Created attachment 161420 [details] [review]
evo patch ][

for evolution;

Because of using approach from bug #556061, this one stands for ordering in the UI only (the rest got fixed by the other bug). Thus this patch only.
Comment 10 Milan Crha 2010-05-19 09:32:35 UTC
Created commit 80ed887 in evo master (2.31.2+)