{ "id": "92827", "key": "TIMOB-9384", "fields": { "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true }, "parent": { "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 } } }, "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13408", "description": "Sprint 2012-12 API", "name": "Sprint 2012-12 API", "archived": true, "released": true, "releaseDate": "2012-06-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-06-06T14:02:09.000+0000", "created": "2012-06-05T13:03:41.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "parity" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-06T22:27:50.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": "Implement createPerson() function, with parity taking into consideration. Test Code:\r\n{code}\r\nvar photo = Ti.UI.createImageView({\r\n image: 'KS_nav_ui.png'\r\n}).toBlob();\r\nvar person = Ti.Contacts.createPerson({\r\n firstName: 'Paul',\r\n lastName: 'Dowsett',\r\n birthday: '2012-01-01T12:00:00.000+0000',\r\n organization: 'Appcelerator',\r\n phone:{\r\n mobile: ['07900 000001', '07900 000002'],\r\n work: ['+44 (0)118 925 6128', '+44 (0)118 000 0000']\r\n },\r\n address:{\r\n work:[\r\n {\r\n Street: '200 Brook Drive\\nGreen Park',\r\n City: 'Reading',\r\n County: 'Berkshire',\r\n Country: 'England',\r\n ZIP: 'RG2 6UB'\r\n },\r\n {\r\n Street: '1 St Pauls Road\\nClerkenwell',\r\n City: 'City of London',\r\n State: 'London',\r\n Country: 'England',\r\n ZIP: 'EC1 1AA'\r\n }\r\n ],\r\n home:[\r\n {\r\n CountryCode: 'gb', // determines how the address is displayed\r\n Street: '2 Boleyn Court',\r\n City: 'London',\r\n State: 'Greenwich',\r\n Country: 'England',\r\n ZIP: 'SE10'\r\n }\r\n ]\r\n },\r\n instantMessage:{\r\n home:[\r\n {\r\n service: 'AIM',\r\n username: 'leisureAIM'\r\n },\r\n {\r\n service: 'MSN',\r\n username: 'no_paul_here@msn.com'\r\n }\r\n ],\r\n work:[\r\n {\r\n service: 'Facebook',\r\n username: 'seriousAIM'\r\n }\r\n ]\r\n },\r\n url:{\r\n homepage: ['www.google.com'],\r\n work: ['www.appcelerator.com', 'www.example.com']\r\n },\r\n email:{\r\n home: ['hi@google.com'],\r\n work: ['three@google.com', 'hp@appcelerator.com']\r\n },\r\n note: 'Hello. The name is James. James Bond',\r\n nickname: 'Superhero',\r\n image: photo,\r\n relatedNames:{\r\n parent: ['dad', 'mom'],\r\n assistant: ['assistant']\r\n },\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\nTi.API.info(\"firstName: should be Paul => \" + person.firstName);\r\nTi.API.info(\"lastName: should be Dowsett => \" + person.lastName);\r\nTi.API.info(\"birthday: should be 2012-01-01T12:00:00.000+0000 => \" + person.birthday);\r\nTi.API.info(\"organization: should be Appcelerator => \" + person.organization);\r\nTi.API.info(\"mobile phone: should be '07900 000001', '07900 000002' => \" + person.phone.mobile[0] + \", \" + person.phone.mobile[1]);\r\nTi.API.info(\"home Street: should be 2 Boleyn Court => \" + person.address.home[0].Street);\r\nTi.API.info(\"home instantMessage serviceName: should be AIM, MSN => \" + person.instantMessage.home[0].service + \", \" + person.instantMessage.home[1].service);\r\nTi.API.info(\"work instantMessage: should be [object Object] => \" + person.instantMessage.work[0]);\r\nTi.API.info(\"homepage url: should be www.google.com => \" + person.url.homepage[0]);\r\nTi.API.info(\"work url: should be www.appcelerator.com, www.example.com => \" + person.url.work[0] + \", \" + person.url.work[1]);\r\nTi.API.info(\"work email: should be three@google.com, hp@appcelerator.com => \" + person.email.work[0] + \", \" + person.email.work[1]);\r\nTi.API.info(\"note: \" + person.note);\r\nTi.API.info(\"nickname: \" + person.nickname);\r\nTi.API.info('image: ' + person.image);\r\nTi.API.info('dad: ' + person.relatedNames.parent[0]);\r\nTi.API.info('anniverary: ' + person.date.anniversary[0]);\r\n{code}\r\n\r\n1. Run the above code\r\n2. Go to contacts book and check to see if this contact is created with specified fields\r\n3. Verify correctness of log output.", "attachment": [], "flagged": false, "summary": "Android: Implementation of createPerson(), adding new contacts into database", "creator": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "409406", "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-06T22:27:50.000+0000", "updated": "2017-03-06T22:27:50.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }