GNOME Bugzilla – Bug 523775
Order of Email Addresses in UI is broken
Last modified: 2010-05-19 09:32:35 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.
Card View uses the very same reverse order. This most likely is an issue with the Contact editor design.
FWIW, the displayed order is 4, 2, 3, 1 in tab order in the UI...
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.
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?
*** Bug 587382 has been marked as a duplicate of this bug. ***
Milan, any updates on this?
(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).
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.
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.
Created commit 80ed887 in evo master (2.31.2+)