{ "id": "61633", "key": "TIMOB-1001", "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": "11224", "name": "Release 1.4.0", "archived": true, "released": true, "releaseDate": "2010-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:55.000+0000", "created": "2011-04-15T02:41:13.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "contacts", "defect", "ios", "iphone", "phone", "picker" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:55.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": "{html}

If any phone number other than the first one is clicked, the app\ncrashes. code below.

\n

Titanium.Contacts.showContactPicker({
\nsuccess:function(event){
\nTi.API.log(event);
\n//var phonenr=event.contact.phone[0].value; //This crashes if I\npick the not-first phone number for the contact. //var\norg=event.contact.organization; //This crashes },\ndetails:['firstName','lastName','phone','organization']
\n});

\n

After some testing I do not see an index of which number was\nclicked. I think its only looking for the first number in the\ncontacts info although when a number is clicked, you can get to all\nthe numbers for that contact but you do not know which one was\nclicked.

{html}", "attachment": [], "flagged": false, "summary": "Contact Picker", "creator": { "name": "ctredway1", "key": "ctredway1", "displayName": "ctredway", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ctredway1", "key": "ctredway1", "displayName": "ctredway", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124542", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This code is for the old contacts module. Contacts has been\nrewritten, I will attempt to rewrite the given example for the new\nframework and see if it works. Multivalue properties did not work\nat all in the old contacts code.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:14.000+0000", "updated": "2011-04-15T02:41:14.000+0000" }, { "id": "124543", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

The following is the correct way to obtain property information\nfrom the contact picker. See the Contacts documentation.

\n
\n\n// Way 1\nTitanium.Contacts.showContacts({\nselectedPerson: function(e) {\n    var person = e.person;\n    var emails = person.email;\n    Ti.API.log(emails); // Display the multivalue format, or...\n    for (var label in emails) {\n        var emailList = emails[label];\n        Ti.API.log(label + \": \"+emailList);\n    }\n}\n});\n\n// Way 2\nTitanium.Contacts.showContacts({\nselectedProperty: function(e) {\n    if (e.property == 'email') {\n        Ti.API.log(e.label + \": \" + e.value);\n    }\n}\n});\n
{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:14.000+0000", "updated": "2011-04-15T02:41:14.000+0000" }, { "id": "124544", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [312e90a78aabe995241fda4530c5bf9cc582a98f])\nCloses #1001: Documentation changes for Contacts.\n\nhttp://github.com/appcelerator/titanium_mobile/commit/312e90a78aabe...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:15.000+0000", "updated": "2011-04-15T02:41:15.000+0000" }, { "id": "124545", "author": { "name": "vincentyoumans", "key": "vincentyoumans", "displayName": "vincent youmans", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

instead of returning the email, can I return a specific Phone\nnumber?
\nphone is an array, and not sure how you would select an array item\nusing your method.

{html}", "updateAuthor": { "name": "vincentyoumans", "key": "vincentyoumans", "displayName": "vincent youmans", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:15.000+0000", "updated": "2011-04-15T02:41:15.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }