{ "id": "93358", "key": "TIMOB-9589", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "13870", "description": "", "name": "Sprint 2012-16 API", "archived": true, "released": true, "releaseDate": "2012-08-13" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-08-06T17:38:13.000+0000", "created": "2012-06-15T21:52:06.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "module_media", "parity", "qe-testadded" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "17851", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "62526", "key": "TIMOB-1894", "fields": { "summary": "Android: support read-write contacts", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-10T06:08:37.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": "Support for modify contact ", "attachment": [], "flagged": false, "summary": "Android: Support modify contact", "creator": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "208573", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Testing code:\r\n{code}\r\nvar photo = Ti.UI.createImageView({\r\n image: 'KS_nav_views.png'\r\n}).toBlob();\r\n\r\nvar person = Ti.Contacts.createPerson({\r\n firstName: 'Aaron',\r\n lastName: 'Smith',\r\n date: {\r\n anniversary: ['2002-11-11T11:23:30.000+0000'],\r\n other: ['2011-04-02T12:00:00.000+0000']\r\n }\r\n}); \r\n\r\n\r\nperson.organization = \"google\";\r\nperson.phone = {\r\n mobile: ['9999999991', '1234556677'],\r\n work: ['9999998888', '1234567789']\r\n };\r\nperson.address = {\r\n work:[\r\n {\r\n Street: '900 West Drive',\r\n City: 'New York',\r\n County: 'Berkshire',\r\n Country: 'U.S.A',\r\n ZIP: '99999'\r\n },\r\n {\r\n Street: '456 New Ave.',\r\n City: 'San Jose',\r\n State: 'California',\r\n Country: 'U.S.A',\r\n ZIP: '94082'\r\n }\r\n ],\r\n home:[\r\n {\r\n Street: '2 East Drive',\r\n City: 'Las Vegas',\r\n State: 'Nevada',\r\n Country: 'U.S.A',\r\n ZIP: '55555'\r\n }\r\n ]};\r\nperson.instantMessage = {\r\n home:[\r\n {\r\n service: 'AIM',\r\n username: 'Dominator'\r\n },\r\n {\r\n service: 'MSN',\r\n username: 'dominator@msn.com'\r\n }\r\n ],\r\n work:[\r\n {\r\n service: 'Facebook',\r\n username: 'Dominator2'\r\n }\r\n ]\r\n};\r\nperson.url = {\r\n homepage: ['www.myspace.com'],\r\n work: ['www.apple.com', 'www.yahoo.com']\r\n};\r\nperson.email = {\r\n home: ['hieu@google.com'],\r\n work: ['pham@google.com', 'hp007@appcelerator.com']\r\n};\r\nperson.relatedNames = {\r\n parent: ['daddy', 'mommy'],\r\n assistant: ['mayhem']\r\n};\r\nperson.date = {\r\n anniversary: ['2022-11-11T11:23:30.000+0000'],\r\n other: ['2003-04-02T12:00:00.000+0000']\r\n};\r\nperson.firstName = \"Ade\";\r\nperson.lastName = \"Crude\";\r\nperson.birthday = \"1999-01-01T12:00:00.000+0000\";\r\nperson.organization = \"GOOGLE\";\r\nperson.note = \"NOTE: MASS EFFECT\";\r\nperson.nickname = \"NICKNAME: THOR\";\r\nperson.image = photo;\r\nTi.Contacts.save([person]);\r\n{code}\r\n1. Run this code\r\n2. Look at contact and see if fields are populated correctly", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-19T17:31:23.000+0000", "updated": "2012-08-01T17:47:29.000+0000" }, { "id": "208813", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "[ERROR][V8Exception( 581)] Exception occurred at app.js:85: Uncaught TypeError: Object # has no method 'save'\r\nusing Titanium 2.2.0 (2012/07/20 17:01 c08a3ae)\r\n", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-07-21T08:21:50.000+0000", "updated": "2012-07-21T08:21:50.000+0000" }, { "id": "214130", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "example is working with 2.2.0 b20120810194112!\r\nBut when I try to read person.fullName I always get an empty string now!", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-08-13T12:43:43.000+0000", "updated": "2012-08-13T12:43:43.000+0000" }, { "id": "215440", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-21T14:44:41.000+0000", "updated": "2012-08-21T14:44:41.000+0000" }, { "id": "219454", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "strange behavior:\r\ninside my emulator I can download photos from facebook and save them to the person. Using the same program on my phone will save the wrong photo to a person\r\n\r\nEmulator:\r\n[INFO] Titanium SDK version: 3.0.0 (09/17/12 23:41 5486a27) \r\nAndroid 4.0.4\r\n\r\nPhone:\r\nSGS2 Android 4.1.1\r\n\r\n\r\nDownload function\r\n{code}\r\nfunction downloadImage(_p,_id){\r\n// p = ti.contact.person\r\n// id = facebook id\r\n\r\n\tvar fbUserIcon = \"http://graph.facebook.com/\"+_id+\"/picture?type=normal\"\r\n\tvar xhr = Titanium.Network.createHTTPClient();\r\n xhr.open('GET', fbUserIcon, false);\r\n xhr.send();\r\n \r\n \r\n xhr.onload = function() {\r\n\t if (xhr.readyState == 4) {\r\n\t \t_currentUser = _p;\r\n \tvar f = Ti.Filesystem.getFile(_dir,_p.fullName +\".jpg\");\r\n \tf.write(xhr.responseData);\r\n \t_photoURL = f;\r\n \tvar photo = Ti.UI.createImageView({ image: f,width:100,height:100 });\r\n \t_lbl.text = _p.fullName+\"\\n\"+f.nativePath;\r\n \t_win_main.add(photo);\r\n\t }\r\n\t}\t\r\n}\r\n{code}\r\n\r\n\r\n\r\nSaving: \r\n{code}\r\nvar photo = Ti.UI.createImageView({ image: _photoURL,width:100,height:100 });\r\n_currentUser.image = photo.toBlob();\r\nTi.Contacts.save([_currentUser]);\r\n{code}\r\nIt displays the correct name and image on the screen but when I have a look at my contacts afterwards (on the phone) they are all mixed up", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-09-18T09:54:33.000+0000", "updated": "2012-09-18T09:56:27.000+0000" }, { "id": "227208", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue. All fields are populated correctly.\r\nTested and verified on:\r\nTitanium Studio, build: 3.0.0.201211121907\r\nTitanium SDK, build: 3.0.0.v20121113111657\r\nDevice: Samsung Galaxy SIII (4.0.4)", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-13T23:19:46.000+0000", "updated": "2012-11-13T23:19:46.000+0000" }, { "id": "283479", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/5021\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-10T06:08:37.000+0000", "updated": "2013-12-10T06:08:37.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }