[evolution-data-server] Bug 697859 - Google: "Other Fax" is saved as "Business Fax"



commit e40b88b4e1b7c90cf0490cbca08c7912583eebc4
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed May 8 10:48:03 2013 -0400

    Bug 697859 - Google: "Other Fax" is saved as "Business Fax"
    
    The gd:phoneNumber @rel value "http://schemas.google.com/g/2005#fax";
    has no clear mapping to an EContact field.
    
    Both it and "http://schemas.google.com/g/2005#other_fax"; end up in a
    vCard as TEL;TYPE=fax.  But because of the conversion table ordering,
    TEL;TYPE=fax was being saved as "#fax" instead of "#other_fax".
    
    Then when reading the contact back from Google, I guess some fallback
    logic somewhere was converting "#fax" to "TEL;TYPE="work,fax".  Never
    found exactly where that was happening.  Maybe in the Contact Editor?
    
    This commit reorders the conversion table to prefer "#other_fax" over
    "#fax".  There's still a conflict where if a Google contact specifies
    both "#fax" and "#other_fax" one of the fax numbers may be lost.  But
    honestly, who has that many fax machines nowadays?

 addressbook/backends/google/e-book-google-utils.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/addressbook/backends/google/e-book-google-utils.c 
b/addressbook/backends/google/e-book-google-utils.c
index a1efac9..1739411 100644
--- a/addressbook/backends/google/e-book-google-utils.c
+++ b/addressbook/backends/google/e-book-google-utils.c
@@ -904,7 +904,6 @@ static const struct RelTypeMap rel_type_map_phone[] = {
        { "callback", { EVC_X_CALLBACK, NULL }},
        { "car", { "CAR", NULL }},
        { "company_main", {EVC_X_COMPANY, NULL }},
-       { "fax", { "FAX", NULL }},
        { "isdn", { "ISDN", NULL }},
        { "main", { "PREF", NULL }},
        { "mobile", { "CELL", NULL }},
@@ -913,7 +912,12 @@ static const struct RelTypeMap rel_type_map_phone[] = {
        { "pager", { "PAGER", NULL }},
        { "radio", { EVC_X_RADIO, NULL }},
        { "telex", { EVC_X_TELEX, NULL }},
-       { "tty_tdd", { EVC_X_TTYTDD, NULL }}
+       { "tty_tdd", { EVC_X_TTYTDD, NULL }},
+
+       /* XXX This has no clear mapping to an EContact field.
+        *     It's listed here for completeness, but ordered
+        *     last so that "other_fax" is preferred. */
+       { "fax", { "FAX", NULL }}
 };
 
 static const struct RelTypeMap rel_type_map_im[] = {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]