{ "id": "64105", "key": "TIMOB-3473", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11357", "description": "Mobile 1.8.0 M04", "name": "Sprint 2011-25", "archived": true, "released": true, "releaseDate": "2011-06-27" } ], "resolution": { "id": "6", "description": "", "name": "Hold" }, "resolutiondate": "2011-06-24T16:27:17.000+0000", "created": "2011-04-15T03:45:39.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-07T18:07:28.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

As described in ticket YAJ-53154-797,\r\nTi.Contacts.getAllGroups() does not return all groups. Seems like\r\nsystem-managed groups, like \"All Contacts\", \"Mobile Me\", etc... are\r\nnot returning. But custom contact groups do return.

\r\n

Test case, create two contact groups on the computer's address\r\nbook and sync with iPhone, run this code on app.js:

\r\n
\r\nvar groups = Titanium.Contacts.getAllGroups();\r\nalert(groups.length);\r\n
\r\n

The alert will alert two instead of three (two custom and one\r\nsystem: All Contacts). And if one of the groups is a Mobile Me\r\ncontacts groups, for exmple, it will be ignored.

\r\n

Tested on Ti SDK 1.6.2
\r\niOS 4.3 Device (iPhone 4)

{html}", "attachment": [], "flagged": false, "summary": "iOS Contacts.getAllGroups not returning all groups", "creator": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "130709", "author": { "name": "johnvpataki", "key": "johnvpataki", "displayName": "johnvpataki", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

An additional test would be if you have not \"created\" any groups\non your own.
\nBut in Contacts on the device you see 3 groups that are,\nsupposedly, system-managed groups like I do (\"All contacts\"\n\"MobileMe\" \"On My Mac\") and run that same code block mentioned by\nPedro, you will see 0 (zero) groups returned.
\nEssentially at this point - unless you have created custom groups -\nthis method is non functional.

{html}", "updateAuthor": { "name": "johnvpataki", "key": "johnvpataki", "displayName": "johnvpataki", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:45:39.000+0000", "updated": "2011-04-15T03:45:39.000+0000" }, { "id": "130710", "author": { "name": "johnvpataki", "key": "johnvpataki", "displayName": "johnvpataki", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

Also - not sure if this needs to be an additional ticket or not\n..

\n

Because of this inability to \"getAllGroups\" and then get the\ncontacts per system-managed group combined with the inability to\nidentify what group a contact belongs when reviewing contact\ndetails from getAllPeople() - you get a list of contacts that is\nfar too large and has multiple of the same contact with no way to\ndetermine which is from which group.

\n

When I run getAllPeople() I get a list of nearly 4000 contacts\nthat has many duplicate and triplicates in there because they come\nfrom multiple system-managed groups that I cannot detect to filter\nout.

{html}", "updateAuthor": { "name": "johnvpataki", "key": "johnvpataki", "displayName": "johnvpataki", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:45:39.000+0000", "updated": "2011-04-15T03:45:39.000+0000" }, { "id": "131022", "author": { "name": "patakijv", "key": "patakijv", "displayName": "John V Pataki", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can I get an update on the status of the defect here? Unless I can filter or search based on group so I don't get replicated contacts, I cannot continue with the app in Titanium.", "updateAuthor": { "name": "patakijv", "key": "patakijv", "displayName": "John V Pataki", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-19T10:23:31.000+0000", "updated": "2011-04-19T10:23:31.000+0000" }, { "id": "133096", "author": { "name": "patakijv", "key": "patakijv", "displayName": "John V Pataki", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This problem prohibits the ability to get a list of contacts without getting replicated contacts in the list - is there a fix planned or a workaround?", "updateAuthor": { "name": "patakijv", "key": "patakijv", "displayName": "John V Pataki", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-03T12:41:24.000+0000", "updated": "2011-05-03T12:41:24.000+0000" }, { "id": "157756", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Apple bug. We can't work around it; it occurs at the API level.\n\nRadar # is 9674125.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-24T16:27:17.000+0000", "updated": "2011-06-24T16:27:17.000+0000" }, { "id": "409521", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-07T18:07:28.000+0000", "updated": "2017-03-07T18:07:28.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }