{ "id": "64264", "key": "TIMOB-3604", "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": "11356", "description": "Mobile 1.8.0 M03", "name": "Sprint 2011-24", "archived": true, "released": true, "releaseDate": "2011-06-20" }, { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-06-15T10:10:20.000+0000", "created": "2011-04-18T08:38:58.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "11233", "name": "Release 1.6.0", "archived": true, "released": true, "releaseDate": "2011-02-23" } ], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2011-07-07T19:14:43.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h1. Problem\r\nOn Android, Ti.Contacts.getPeopleWithName only matches contacts with an exact display_name. The docs say that (and iOS behaves such that) all contacts will be returned \"who have a name (first, last, middle, composite) which matches the given name\". Can we expand Android to match on partial names, like \"Daws\" matching \"Dawson Toth\"?\r\n\r\nh2. Sample Code\r\nThe following demonstrates a query that works on iOS for me, but not on Android. If I change it to search for my full name, Dawson Toth, it correctly finds my contact information.\r\n\r\n{code:title=app.js|borderStyle=solid}\r\n var win = Ti.UI.createWindow({ backgroundColor: '#fff' });\r\n win.add(label = Ti.UI.createLabel());\r\n win.open();\r\n \r\n var people = Titanium.Contacts.getPeopleWithName('Daws');\r\n for(var i = 0, l = people.length; i < l; i++) {\r\n label.text += people[i].fullName + '\\n';\r\n }\r\n if (people.length == 0) {\r\n label.text = 'No people found!';\r\n }\r\n{code}\r\n\r\nh2. Tested On\r\nTitanium SDK version: 1.7.0 (04/05/11 10:30 731db9c...)\r\nBROKEN on Android Device Samsung Epic 4G running Android 2.2\r\nWORKS on iPhone Simulator 4.2", "attachment": [], "flagged": false, "summary": "Android: Ti.Contacts.getPeopleWithName Only Matches display_name", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "134135", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "The customer has submitted a pull request with fixes for this issue.\n\nhttps://github.com/appcelerator/titanium_mobile/pull/99", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-05-24T08:32:04.000+0000", "updated": "2011-05-24T08:32:04.000+0000" }, { "id": "134653", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Notice the pull request.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-01T12:38:43.000+0000", "updated": "2011-06-01T12:38:43.000+0000" }, { "id": "156503", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "ready for when contributor signs cla", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-06-10T15:08:44.000+0000", "updated": "2011-06-10T15:08:44.000+0000" }, { "id": "156801", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "A note re parity: I've tested (and looked at) how the iOS implementation works. It indeed matches \"Daws\" if, for example, the display name is \"William Dawson\", and that's precisely what the contributor's (David Bankier's) code gives us now in Android.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-06-15T09:25:38.000+0000", "updated": "2011-06-15T09:25:38.000+0000" }, { "id": "158990", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fixed on Nexus S and Xoom with SDK 1.7.2 r3d44999e and 1.8.0 r4b694252\n", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-07T19:14:43.000+0000", "updated": "2011-07-07T19:14:43.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }