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 420012 - Evolution prevents e_contact_set() from working for IM screennames
Evolution prevents e_contact_set() from working for IM screennames
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Contacts
3.6.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2007-03-19 05:24 UTC by Travis Reitter
Modified: 2015-06-04 19:22 UTC
See Also:
GNOME target: ---
GNOME version: 3.5/3.6


Attachments
vcard-aim.c (1.49 KB, text/plain)
2015-06-04 19:22 UTC, Milan Crha
Details

Description Travis Reitter 2007-03-19 05:24:40 UTC
Please describe the problem:
Evolution and an external program using Evolution Data Server's EContact objects can each handle IM screennames fine on their own. But my external program cannot correctly set some IM screenname fields modified through Evolution.

Steps to reproduce:
1. Make a new contact "Foo Bar" in Evolution
2. In a separate program, run the code

/* contact <- EContact* of "Foo Bar" */
e_contact_set (contact,
                        E_CONTACT_IM_AIM_HOME_1,
                        (gpointer) "aim-home-A");
e_contact_set (contact,
                        E_CONTACT_IM_AIM_HOME_2,
                        (gpointer) "aim-home-B");

if (e_book_commit_contact (pb->book, contact, &error) == FALSE)
  {
    /* I haven't seen this block execute during actual program execution */
    g_warning ("Could not commit changes to address book, %s", 
                  error ? error->message : "no error given");
    g_clear_error (&error);
  } 

3. Print the VCard of "Foo Bar":

...
X-AIM;TYPE=HOME:aim-home-A
X-AIM;TYPE=HOME:aim-home-B
...

4. Observe that Evolution will read Foo Bar's AIM screennames as expected.

5. Open Foo Bar in the Evolution Contact Editor. Make the following changes in the appropriate GtkEntry widgets at the bottom of the dialog:

"aim-home-A" -> "aim-home-C"
"aim-home-B" -> "aim-home-D"

5. Print the VCard of "Foo Bar":

...
X-AIM;TYPE=HOME;X-EVOLUTION-UI-SLOT=1:aim-home-C
X-AIM;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:aim-home-D
...

6. Re-execute the code in Step 2.

7. Print the VCard of "Foo Bar":

...
X-AIM;TYPE=HOME;X-EVOLUTION-UI-SLOT=1:aim-home-B
X-AIM;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:aim-home-D
...

Actual results:
Notice in Step 7. that "aim-home-B" should be in "SLOT=2", but more importantly, that "aim-home-D" has remained and "aim-home-A" was not saved. The behavior seems consistent for every protocol and "type" (home/work) and extends to the *_3 fields (but I only used two in this example for simplicity).

Expected results:
Using e_contact_set() to set a contact field will change that field, and only that field.

Does this happen every time?
Yes.

Other information:
My program uses a single function to set most of the simple EContact fields (phone, email, IM names, Web URLS). I only have problems with the IM fields.
Comment 1 Øystein Gisnås 2007-04-21 16:03:11 UTC
I think this is a consequence of the multi fields in contact. e_contact_set_property() in evolution-data-server/addressbook/libebook/e-contact.c contains some explanation why this is a difficult problem. A "quick fix" would probably lead to some other regression.
Comment 2 André Klapper 2012-08-07 07:56:07 UTC
Seeing the comments in evolution-data-server/addressbook/libebook/e-contact.c this is likely still an issue in 3.5. Bumping version.
Comment 3 Milan Crha 2015-06-04 19:22:04 UTC
Created attachment 304611 [details]
vcard-aim.c

I just tested this in 3.12.11 and even there it works properly, thus it was fixed meanwhile. I' marking it as such.