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 660535 - Google contact groups/categories not showing in category list
Google contact groups/categories not showing in category list
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
3.10.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
evolution[google]
Depends on:
Blocks: 727137
 
 
Reported: 2011-09-30 03:47 UTC by Ian B. MacDonald
Modified: 2014-03-27 07:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
google: Add contact groups to Evolution’s category list (1.65 KB, patch)
2014-03-14 12:33 UTC, Philip Withnall
needs-work Details | Review
google: Add contact groups to Evolution’s category list (3.32 KB, patch)
2014-03-15 21:28 UTC, Philip Withnall
none Details | Review
google: Add contact groups to Evolution’s category list (3.31 KB, patch)
2014-03-15 21:34 UTC, Philip Withnall
committed Details | Review

Description Ian B. MacDonald 2011-09-30 03:47:42 UTC
Running 3.2.0 in current Ubuntu 11.10 B2. Refresh is set to 1 minute for my Google contacts configured through Online Accounts.

I noticed that only some of my Google groups are showing up in my Categories list.  As best I can tell the groups that are configured in my local contacts and other legacy categories (from years of Evolution) are showing up in my list, and when they match my Google contact groups, all works as expected. Many of my Google groups are missing.  The simple steps below reproduce the issue for me.

a) In evolution create new contact "A" with new category "A"
b) In evolution create new contact "AA" with new category "B"
c) In Google contacts create new contact "AAA" with group "C"
d) In Google contacts create new contact "AAAA" with group "D"

In my browser, as I create the last contact I can already see all four new contacts and groups (A,B,C,D) in Google contacts.

Switching windows to evolution shows all four contacts and properly configured Categories as well (including the additional "Personal" category for the two contacts created in Google contacts).

e) Pull down the categories list and none of the new categories (A,B,C,D) are present
f) evolution --force-shutdown
g) Restart evo, still none of the new groups (A,B,C,D) showing as categories
h) Add one of the missing groups (A,B,C,D) to a contact in a visible category, sill none of the new groups in the categories pulldown
Comment 1 Ian B. MacDonald 2011-09-30 03:58:18 UTC
As a final observation, I clean my data up in Google contacts (all four new contacts and the four new groups) and the contact modified in h) no longer shows the additional group I had added when viewed in Google contacts.

In evolution, even after --force-shutdown, kill-factories, restart, the contact modified in h) shows the additional category, yet it does not show in the list, and does not appear in Google contacts.
Comment 2 Philip Withnall 2014-03-14 12:33:15 UTC
Created attachment 271880 [details] [review]
google: Add contact groups to Evolution’s category list

This means they should automatically appear in Evolution’s category
selector and editor. Previously, only new groups added manually by
editing a Google contact in Evolution using the category editor were
shown in the list.
Comment 3 Philip Withnall 2014-03-14 12:34:26 UTC
This is a proof-of-concept patch which might fix the problem. I haven’t had a chance to compile it yet, but I think it’s along the right lines. I’ll try and find some time to test it, and poke someone to review it if it’s good.
Comment 4 Philip Withnall 2014-03-15 21:28:47 UTC
Created attachment 272034 [details] [review]
google: Add contact groups to Evolution’s category list

This means they should automatically appear in Evolution’s category
selector and editor. Previously, only new groups added manually by
editing a Google contact in Evolution using the category editor were
shown in the list.
Comment 5 Philip Withnall 2014-03-15 21:29:54 UTC
The updated patch fixes this for me. Milan, how does it look?
Comment 6 Philip Withnall 2014-03-15 21:34:17 UTC
Created attachment 272037 [details] [review]
google: Add contact groups to Evolution’s category list

This means they should automatically appear in Evolution’s category
selector and editor. Previously, only new groups added manually by
editing a Google contact in Evolution using the category editor were
shown in the list.
Comment 7 Philip Withnall 2014-03-15 21:36:20 UTC
(In reply to comment #5)
> The updated patch fixes this for me. Milan, how does it look?

Although thinking a little, it looks like ECategories is not thread safe, and thus potentially not safe to use from a backend thread. Milan, would you prefer it if I added locking to ECategories, or moved the new e_categories_*() calls to an idle callback in the main context?
Comment 8 Matthew Barnes 2014-03-16 15:34:20 UTC
I'd prefer to make ECategories thread-safe, even if that means deprecating some unsafe APIs and replacing them with "dup" or "ref" functions.
Comment 9 Milan Crha 2014-03-17 07:33:43 UTC
(In reply to comment #8)
> I'd prefer to make ECategories thread-safe, even if that means deprecating some
> unsafe APIs and replacing them with "dup" or "ref" functions.

I vote for making ECategories thread-safe too. It'll be better for the future.
Comment 10 Milan Crha 2014-03-17 07:45:31 UTC
Review of attachment 272037 [details] [review]:

Untested, but the patch looks fine. Unfortunately, as we reached hard-code freeze today, better to commit after it. It reminded me, with the thread-safety of e_categories_* functions, preferably do not touch the public API, due to stable branch constraints.
Comment 11 Milan Crha 2014-03-24 15:17:04 UTC
Created commit 4218c84 in eds master (3.13.1+) [1]
Created commit bc34be1 in eds evolution-data-server-3-12 (3.12.1+)

[1] https://git.gnome.org/browse/evolution-data-server/commit/?id=4218c84
Comment 12 Philip Withnall 2014-03-26 18:26:09 UTC
(In reply to comment #10)
> Review of attachment 272037 [details] [review]:
> 
> Untested, but the patch looks fine. Unfortunately, as we reached hard-code
> freeze today, better to commit after it. It reminded me, with the thread-safety
> of e_categories_* functions, preferably do not touch the public API, due to
> stable branch constraints.

Reopening because we haven't yet made ECategories thread safe. I'll try and find time to put together a patch for that soon.
Comment 13 Milan Crha 2014-03-27 07:34:03 UTC
(In reply to comment #12)
> Reopening because we haven't yet made ECategories thread safe.

Better to start a new bug report for it, to not mix different things, though related, into one bug report. I opened bug #727137 for it.