{ "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\nTest 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\nThe 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\nTested on Ti SDK 1.6.2
\r\niOS 4.3 Device (iPhone 4)
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.
Also - not sure if this needs to be an additional ticket or not\n..
\nBecause 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.
\nWhen 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.