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 543957 - Google contacts only gets the first 25 contacts
Google contacts only gets the first 25 contacts
Status: RESOLVED FIXED
Product: conduit
Classification: Other
Component: dataproviders
unspecified
Other All
: Normal normal
: ---
Assigned To: John Carr
conduit-maint@gnome.bugs
: 556046 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-07-21 09:02 UTC by Damien Cassou
Modified: 2009-05-22 16:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to get all contacts not just the first 25. (863 bytes, patch)
2009-02-24 13:05 UTC, Michael
none Details | Review

Description Damien Cassou 2008-07-21 09:02:31 UTC
There is a lack of documentation in both the website and the application. For example, how can I know what "Google Contacts" means? It doesn't seem related to my Gmail contacts because when I synchronize, I only get 25 contacts in my folder.
Comment 1 John Stowers 2008-08-10 07:49:11 UTC
This is less a docs bug, and more a bug in the contacts dataprovider. Jc2k said he would look into this
Comment 2 John Stowers 2008-08-22 00:51:37 UTC
ping Jc2k
Comment 3 John Stowers 2009-02-13 11:28:17 UTC
*** Bug 556046 has been marked as a duplicate of this bug. ***
Comment 4 Giorgio Gelardi 2009-02-13 11:34:52 UTC
I asked gdata-java library dvs too and they said me 25 is a default. To retrieve all contacts please check this out: http://code.google.com/apis/contacts/docs/2.0/developers_guide_protocol.html#retrieving_without_query
Comment 5 Giorgio Gelardi 2009-02-13 20:08:20 UTC
I tried a little change in the ContactsTwoWay class (/conduit/conduit/modules/GoogleModule/GoogleModule.py) and it works:

    def _get_all_contacts(self):
        feed = self.service.GetContactsFeed()
        ##--OLD CODE:
        ##if not feed.entry:
        ##    return []
        ##return [str(contact.id.text) for contact in feed.entry]
        ##--NEW CODE:
        res = []
        while True:
            for contact in feed.entry:
                res.append(str(contact.id.text))
            nextLink = feed.GetNextLink()
            if nextLink == None:
                break
            feed = self.service.GetContactsFeed(uri=nextLink.href)
        return res

(I still don't know how to extract a patch file, sorry)
Comment 6 Michael 2009-02-24 13:05:40 UTC
Created attachment 129405 [details] [review]
Patch to get all contacts not just the first 25.

I can confirm that this bug is still present in the svn code, and that the fix suggested in the previous comment works, I've converted this to a patch.
Comment 7 John Carr 2009-05-22 16:06:09 UTC
It looks like this patch (or an equivalent patch) is applient in Git so closing this bug.