[evolution-patches] Evolution Bug #59582



This patch by Sivaiah fixes bug #59582. It is deemed critical and should
make it in before Evolution 2.0.0, i.e. in gnome-2-8 branch:

http://bugzilla.ximian.com/show_bug.cgi?id=59582
"Contact incompletely updated to LDAP store; address information
lost/not editable"

Description: "I edited the phone number, email and address of a contact
stored in LDAP.  After save, though phone and email are properly
updated, the address remains at its old value in LDAP and in cards view.
Oddly, it keeps new value in the popup edit window if you re-open it."

What the initial submitter describes was fixed before the freeze, but
there was a remaining problem fixed by Sivaiah; the contact's address
fields would remain insensitive and thus not editable.

It has already been approved by our review and committed to HEAD.

-- 
Hans Petter
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.196
diff -u -r1.196 ChangeLog
--- ChangeLog	26 Aug 2004 10:01:08 -0000	1.196
+++ ChangeLog	6 Sep 2004 14:22:00 -0000
@@ -1,3 +1,15 @@
+2004-09-06  Sivaiah Nallagatla <snallagatla novell com>
+	
+	* backends/ldap/e-book-backend-ldap.c : Update 
+	the ldap attribute names for calendar ui and free busy uri
+	fileds to match with what is present in evolutionPerson.schema
+	(add_to_supported_fields) : add E_CONTACT_EMAIL_1 also to list of supported fields.
+	Also use e_contact_field_name function instead of hardcodring field names
+        (anniversary_populate) : correct incorrect contact date
+	parameter passing. Also free the contact date
+
+	Fixes some of the issues mentioned in #59582 	
+	
 2004-08-26  Sivaiah Nallagatla <snallagatla novell com>
 
 	* backends/groupwise/e-book-backend-groupwise.c 
Index: backends/ldap/e-book-backend-ldap.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/ldap/e-book-backend-ldap.c,v
retrieving revision 1.30
diff -u -r1.30 e-book-backend-ldap.c
--- backends/ldap/e-book-backend-ldap.c	21 Aug 2004 21:52:39 -0000	1.30
+++ backends/ldap/e-book-backend-ldap.c	6 Sep 2004 14:22:01 -0000
@@ -280,8 +280,8 @@
 
 	E_COMPLEX_PROP (E_CONTACT_CATEGORY_LIST,  "category", category_populate, category_ber, category_compare),
 
-	STRING_PROP (E_CONTACT_CALENDAR_URI,   "calCalURI"),
-	STRING_PROP (E_CONTACT_FREEBUSY_URL,   "calFBURL"),
+	STRING_PROP (E_CONTACT_CALENDAR_URI,   "calendarURI"),
+	STRING_PROP (E_CONTACT_FREEBUSY_URL,   "freeBusyURI"),
 	STRING_PROP (E_CONTACT_ICS_CALENDAR,   "icsCalendar"),
 
 #undef E_STRING_PROP
@@ -401,20 +401,22 @@
 			bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup (query_prop));
 
 			/* handle the list attributes here */
-			if (!strcmp (query_prop, "email")) {
-				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup ("email_2"));
-				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup ("email_3"));
-				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup ("email_4"));
+			if (!strcmp (query_prop, e_contact_field_name (E_CONTACT_EMAIL))) {
+				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup (e_contact_field_name (E_CONTACT_EMAIL_1)));
+				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup (e_contact_field_name (E_CONTACT_EMAIL_2)));
+				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup (e_contact_field_name (E_CONTACT_EMAIL_3)));
+				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup (e_contact_field_name (E_CONTACT_EMAIL_4)));
 			}
-			else if (!strcmp (query_prop, "business_phone")) {
-				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup ("business_phone_2"));
+			else if (!strcmp (query_prop, e_contact_field_name (E_CONTACT_PHONE_BUSINESS))) {
+				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup (e_contact_field_name (E_CONTACT_PHONE_BUSINESS_2)));
 			}
-			else if (!strcmp (query_prop, "home_phone")) {
-				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup ("home_phone_2"));
+			else if (!strcmp (query_prop, e_contact_field_name (E_CONTACT_PHONE_HOME))) {
+				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup (e_contact_field_name(E_CONTACT_PHONE_HOME_2)));
 			}
-			else if (!strcmp (query_prop, "category_list")) {
-				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup ("categories"));
+			else if (!strcmp (query_prop,e_contact_field_name (E_CONTACT_CATEGORY_LIST) )) {
+				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup (e_contact_field_name (E_CONTACT_CATEGORIES)));
 			}
+			
 		}
 	}
 }
@@ -2120,7 +2122,8 @@
 {
 	if (values[0]) {
 		EContactDate *dt = e_contact_date_from_string (values[0]);
-		e_contact_set (contact, E_CONTACT_ANNIVERSARY, &dt);
+		e_contact_set (contact, E_CONTACT_ANNIVERSARY, dt);
+		e_contact_date_free (dt);
 	}
 }
 


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