{ "id": "107477", "key": "TIMOB-12235", "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": "15117", "description": "2013 Sprint 12 BB", "name": "2013 Sprint 12 BB", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15110", "description": "2013 Sprint 12", "name": "2013 Sprint 12", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-06-12T11:34:54.000+0000", "created": "2013-01-07T13:19:43.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "contacts", "notable", "qe-3.3.0", "qe-testadded", "regression" ], "versions": [], "issuelinks": [ { "id": "24736", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "89616", "key": "TIMOB-8577", "fields": { "summary": "BlackBerry: Implement Contacts module", "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": "Medium", "id": "3" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-20T18:19:44.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": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": null, "attachment": [], "flagged": false, "summary": "BlackBerry: Implement important Titanium.Contacts functionality", "creator": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 105, "state": "closed", "name": "2014 Sprint 11 SDK", "startDate": "2014-05-27T21:43:32.338Z", "endDate": "2014-06-07T00:00:00.000Z", "completeDate": "2014-06-09T21:36:37.587Z", "originBoardId": 114 }, { "id": 121, "state": "closed", "name": "2014 Sprint 12 SDK", "startDate": "2014-06-09T21:51:17.043Z", "endDate": "2014-06-21T00:00:00.000Z", "completeDate": "2014-06-23T16:52:29.621Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "255100", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/63", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-05-31T02:45:09.000+0000", "updated": "2013-05-31T02:45:09.000+0000" }, { "id": "256026", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Left code review comments on the pull request.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-05T00:25:30.000+0000", "updated": "2013-06-05T00:25:30.000+0000" }, { "id": "257329", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested the pull request and ran into some issues. Left comments on the pull request describing the issues.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-12T00:56:38.000+0000", "updated": "2013-06-12T00:56:38.000+0000" }, { "id": "263483", "author": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test 1\n\n{code}\nfunction Label(_title, _message) {\n if(typeof _message == 'object') {\n _message = JSON.stringify(_message)\n }\n return Ti.UI.createLabel({\n top: 10,\n left: 10,\n text: _title + ': ' + _message\n });\n}\n\nfunction ContactWindow(_contactId) {\n\n\tvar contact = Ti.Contacts.getPersonByID(_contactId);\n Ti.API.info(JSON.stringify(contact.address));\n \n var win = Ti.UI.createWindow();\n var scrollView = Ti.UI.createScrollView({\n layout: 'vertical',\n top: 0,\n height: Ti.UI.FILL\n });\n var closeButton = Ti.UI.createButton({\n top: 0,\n \ttitle: 'close'\n });\n\n scrollView.add(closeButton);\n scrollView.add(Label('address',contact.address));\n scrollView.add(Label('birthday',contact.birthday));\n scrollView.add(Label('created',contact.created));\n scrollView.add(Label('department',contact.department));\n scrollView.add(Label('email',contact.email));\n scrollView.add(Label('firstName', contact.firstName));\n scrollView.add(Label('fullName', contact.fullName));\n scrollView.add(Label('firstPhonetic', contact.firstPhonetic));\n scrollView.add(Label('id', contact.id));\n scrollView.add(Label('image', contact.image));\n scrollView.add(Label('instantMessage', contact.instantMessage));\n scrollView.add(Label('jobTitle', contact.jobTitle));\n scrollView.add(Label('kind', contact.kind));\n scrollView.add(Label('lastName', contact.lastName));\n scrollView.add(Label('lastPhonetic', contact.lastPhonetic));\n scrollView.add(Label('middleName', contact.middleName));\n scrollView.add(Label('middlePhonetic', contact.middlePhonetic));\n scrollView.add(Label('modified', contact.modified));\n scrollView.add(Label('nickname', contact.nickname));\n scrollView.add(Label('note', contact.note));\n scrollView.add(Label('organization', contact.organization));\n scrollView.add(Label('phone', contact.phone));\n scrollView.add(Label('prefix', contact.prefix));\n scrollView.add(Label('recordId', contact.recordId));\n scrollView.add(Label('relatedNames', contact.relatedNames));\n scrollView.add(Label('suffix', contact.suffix));\n scrollView.add(Label('url', contact.url));\n\n win.add(scrollView);\n \n closeButton.addEventListener('click', function() {\n win.close();\n });\n return win;\n}\n\n\n\nfunction createContact(){\n Ti.Contacts.createPerson({\n firstName: 'Paul',\n lastName: 'Dowsett',\n address:{\n work:[\n {\n CountryCode: 'gb', // determines how the address is displayed\n Street: '200 Brook Drive\\nGreen Park',\n City: 'Reading',\n County: 'Berkshire',\n Country: 'England',\n ZIP: 'RG2 6UB'\n },\n {\n CountryCode: 'gb', // determines how the address is displayed\n Street: '1 St Pauls Road\\nClerkenwell',\n City: 'City of London',\n State: 'London',\n Country: 'England',\n ZIP: 'EC1 1AA'\n }\n ],\n home:[\n {\n CountryCode: 'gb', // determines how the address is displayed\n Street: '2 Boleyn Court',\n City: 'London',\n State: 'Greenwich',\n Country: 'England',\n ZIP: 'SE10'\n }\n ]\n },\n birthday: new Date(),\n instantMessage:{\n \t AIM: ['leisureAIM'],\n \t MSN: ['no_paul_here@msn.com', 'lala@lala.com'],\n \t skype: ['pec1985', 'pecdev']\n },\n organization: 'Appcelerator',\n phone:{\n mobile: ['07900 000001', '07900 000002'],\n work: ['+44 (0)118 925 6128', '+44 (0)118 000 0000']\n },\n url:{\n homepage: ['www.google.com'],\n work: ['www.appcelerator.com', 'www.example.com']\n }\n });\n\n}\nfunction MainWindow() {\n \n var allContacts = Ti.Contacts.getAllPeople();\n var createButton = Ti.UI.createButton({\n title: 'create contact',\n top: 0,\n height: Ti.UI.SIZE\n });\n \n\n var tableData = [];\n for(var i = 0, len = allContacts.length; i < len; i++) {\n tableData.push({\n title: allContacts[i].firstName + ' ' + allContacts[i].lastName,\n contactId: allContacts[i].id\n });\n }\n\n var win = Ti.UI.createWindow({\n \tlayout:'vertical'\n });\n\n createButton.addEventListener('click', function(){\n \talert('creating contact, please look at the phone\\'s address book')\n \tcreateContact();\n });\n var v = Ti.UI.createView({\n \ttop: 0,\n \theight: Ti.UI.FILL\n });\n var table = Ti.UI.createTableView({\n data: tableData\n });\n\n table.addEventListener('click', function(e){\n ContactWindow(e.rowData.contactId).open();\n });\n v.add(table);\n win.add(createButton);\n win.add(v);\n \n return win;\n}\n\nMainWindow().open();\n{code}", "updateAuthor": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-26T20:11:04.000+0000", "updated": "2013-07-26T20:11:04.000+0000" }, { "id": "265832", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the feature & now we can create a contact in BB successfully with the given code. Thus closing\r\n\r\nEnvironment:\r\nAppcel Studio : 3.1.2.201308082014\r\nTi SDK : 3.1.2.v20130808180613\r\nMac OSX : 10.8.4\r\nAlloy : 1.2.0-alpha6\r\nCLI - 3.1.2-alpha\r\nwin 7 \r\nWin 8 \r\nZ10 BB simulator : 10.0.10.822\r\nZ10 device running 10.0.10.88", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-08-09T23:04:18.000+0000", "updated": "2013-08-09T23:04:18.000+0000" }, { "id": "306746", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with:\r\nMac osx 10.9.3 Mavericks\r\nAppcelerator Studio, build: 3.3.0.201405271647\r\nTitanium SDK, build: 3.3.0.v20140524224144 \r\nNode.JS Version: v0.10.13 \r\nNPM Version: 1.3.2 \r\nacs@1.0.14 \r\nalloy@1.4.0-beta \r\nnpm@1.3.2 \r\ntitanium@3.3.0-beta \r\ntitanium-code-processor@1.1.1\r\nDevice: BB Z10 (10.2.1)\r\nh5. Steps\r\n1. Click \"create contact\"\r\n2. Dismiss the alert and check the phone contacts\r\n\r\nh5.Actual result\r\nno log output\r\nno contact has been created\r\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-28T21:42:06.000+0000", "updated": "2014-05-28T21:44:17.000+0000" }, { "id": "306985", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I'm investigating, not sure why this is failing. It could be a BB bug since this is also failing with a simple native app. This is the actual error I'm getting when debugging the Titanium app through Momentics:\r\n{code}\r\n* About to connect() to 127.0.0.1 port 8888 (#0)\r\n* Trying 127.0.0.1...\r\n* TCP_NODELAY set\r\n* Local Interface lo0 is ip 127.0.0.1 using address family 2\r\n* Local port: 0\r\n* connected\r\n* Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)\r\n> PUT /contact/4/0?enterprise=0 HTTP/1.1\r\nHost: 127.0.0.1:8888\r\nAccept: */*\r\nContent-Type: application/x-www-form-urlencoded\r\npim-session: 299074c3-cd26-4c2f-9ecb-77468dea5695\r\napi-version: 1.0\r\nUser-Agent: com.app.timob12235.testDev__timob1223591d878c2\r\nContent-Length: 2079\r\n\r\n* We are completely uploaded and fine\r\n< HTTP/1.1 500 Internal Server Error\r\n< Content-Length: 21\r\n< Content-Type: application/json\r\n< Date: Fri, 30 May 2014 06:40:01 GMT\r\n< Server: BLACKBERRY-D20A\r\n< \r\n* Closing connection #0\r\nPIMCoreAccessPool::getPca 0 Thread Id 0x1 \r\nPIMCoreAccessPool::getPca a new PimAccess 0 \r\nPOST 0x1 \r\nCurl Easy perform \r\nCurl Easy GetInfo response code \r\nCurl easy getInfo content_length_download \r\nCurl Error Code 0 \r\nResponse Code 500 \r\nStatus Code 500 \r\nException String \"'attributes'\" \r\nError occurred! Investigate! createContactHelper L 565 \r\nPIMCoreAccessPool::getPca 0 Thread Id 0x1 \r\nPIMCoreAccessPool::getPca a new PimAccess 0 \r\nupdateContact called with account id 4 contact id: 0 \r\nPUT 0x1 \r\nCurl Easy perform \r\nCurl Easy GetInfo response code \r\nCurl easy getInfo content_length_download \r\nCurl Error Code 0 \r\nResponse Code 500 \r\nStatus Code 500 \r\nException String \"\" \r\n{code}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-05-30T10:41:33.000+0000", "updated": "2014-05-30T10:41:33.000+0000" }, { "id": "308108", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~penrique] Can you please log a bug with BB for this?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-09T21:24:14.000+0000", "updated": "2014-06-09T21:24:14.000+0000" }, { "id": "308653", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Ok, figured it out. When we first implemented this, it worked and now it does not.\r\nWhen a contact if first created in Titanium, an empty BB contact was created and then updated as properties are passed in the object. This now fails as BB does not allow us to create an empty contact. Fixed it by checking if the created contact is valid before updating it, and then added the property.\r\n\r\nPR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/266", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-06-12T11:34:19.000+0000", "updated": "2014-06-12T11:34:19.000+0000" }, { "id": "308654", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Please use this code for testing.\r\nIt incrementes the contacts first name, last name, etc... so that duplicated can be created and better tested.\r\n{code}\r\nfunction Label(_title, _message) {\r\n if(typeof _message == 'object') {\r\n _message = JSON.stringify(_message)\r\n }\r\n return Ti.UI.createLabel({\r\n top: 10,\r\n left: 10,\r\n text: _title + ': ' + _message\r\n });\r\n}\r\n \r\nfunction ContactWindow(_contactId) {\r\n \r\n var contact = Ti.Contacts.getPersonByID(_contactId);\r\n Ti.API.info(JSON.stringify(contact.address));\r\n \r\n var win = Ti.UI.createWindow();\r\n var scrollView = Ti.UI.createScrollView({\r\n layout: 'vertical',\r\n top: 0,\r\n height: Ti.UI.FILL,\r\n width: Ti.UI.FILL,\r\n contentHeight: Ti.UI.SIZE,\r\n contentWidth: Ti.UI.FILL\r\n });\r\n var closeButton = Ti.UI.createButton({\r\n top: 0,\r\n title: 'close'\r\n });\r\n \r\n scrollView.add(closeButton);\r\n scrollView.add(Label('address',contact.address));\r\n scrollView.add(Label('birthday',contact.birthday));\r\n scrollView.add(Label('created',contact.created));\r\n scrollView.add(Label('department',contact.department));\r\n scrollView.add(Label('email',contact.email));\r\n scrollView.add(Label('firstName', contact.firstName));\r\n scrollView.add(Label('fullName', contact.fullName));\r\n scrollView.add(Label('firstPhonetic', contact.firstPhonetic));\r\n scrollView.add(Label('id', contact.id));\r\n scrollView.add(Label('image', contact.image));\r\n scrollView.add(Label('instantMessage', contact.instantMessage));\r\n scrollView.add(Label('jobTitle', contact.jobTitle));\r\n scrollView.add(Label('kind', contact.kind));\r\n scrollView.add(Label('lastName', contact.lastName));\r\n scrollView.add(Label('lastPhonetic', contact.lastPhonetic));\r\n scrollView.add(Label('middleName', contact.middleName));\r\n scrollView.add(Label('middlePhonetic', contact.middlePhonetic));\r\n scrollView.add(Label('modified', contact.modified));\r\n scrollView.add(Label('nickname', contact.nickname));\r\n scrollView.add(Label('note', contact.note));\r\n scrollView.add(Label('organization', contact.organization));\r\n scrollView.add(Label('phone', contact.phone));\r\n scrollView.add(Label('prefix', contact.prefix));\r\n scrollView.add(Label('recordId', contact.recordId));\r\n scrollView.add(Label('relatedNames', contact.relatedNames));\r\n scrollView.add(Label('suffix', contact.suffix));\r\n scrollView.add(Label('url', contact.url));\r\n \r\n win.add(scrollView);\r\n \r\n closeButton.addEventListener('click', function() {\r\n win.close();\r\n });\r\n return win;\r\n}\r\n \r\n var x = 0;\r\n \r\nfunction createContact(){\r\n Ti.Contacts.createPerson({\r\n firstName: 'Paul ' + (x++),\r\n lastName: 'Dowsett ' + (x++),\r\n address:{\r\n work:[\r\n {\r\n CountryCode: 'gb', // determines how the address is displayed\r\n Street: '200 Brook Drive\\nGreen Park ' + (x++),\r\n City: 'Reading',\r\n County: 'Berkshire',\r\n Country: 'England',\r\n ZIP: 'RG2 6UB'\r\n },\r\n {\r\n CountryCode: 'gb', // determines how the address is displayed\r\n Street: '1 St Pauls Road\\nClerkenwell ' + (x++),\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 ' + (x++),\r\n City: 'London',\r\n State: 'Greenwich',\r\n Country: 'England',\r\n ZIP: 'SE10'\r\n }\r\n ]\r\n },\r\n birthday: new Date(),\r\n instantMessage:{\r\n AIM: ['leisureAIM ' + (x++)],\r\n MSN: ['no_paul_here@msn.com', 'lala@lala.com'],\r\n skype: ['pec1985 ' + (x++), 'pecdev ' + (x++)]\r\n },\r\n organization: 'Appcelerator ' + (x++),\r\n });\r\n \r\n}\r\nfunction MainWindow() {\r\n \r\n var allContacts = Ti.Contacts.getAllPeople();\r\n var createButton = Ti.UI.createButton({\r\n title: 'create contact',\r\n top: 0,\r\n height: Ti.UI.SIZE\r\n });\r\n \r\n \r\n var tableData = [];\r\n for(var i = 0, len = allContacts.length; i < len; i++) {\r\n tableData.push({\r\n title: allContacts[i].firstName + ' ' + allContacts[i].lastName,\r\n contactId: allContacts[i].id\r\n });\r\n }\r\n \r\n var win = Ti.UI.createWindow({\r\n layout:'vertical'\r\n });\r\n \r\n createButton.addEventListener('click', function(){\r\n createContact();\r\n alert('creating contact, please look at the phone\\'s address book')\r\n setTimeout(function(){\r\n var tableData = [];\r\n var allContacts = Ti.Contacts.getAllPeople();\r\n for(var i = 0, len = allContacts.length; i < len; i++) {\r\n tableData.push({\r\n title: allContacts[i].firstName + ' ' + allContacts[i].lastName,\r\n contactId: allContacts[i].id\r\n });\r\n }\r\n table.data = tableData;\r\n }, 300);\r\n });\r\n var v = Ti.UI.createView({\r\n top: 0,\r\n height: Ti.UI.FILL\r\n });\r\n var table = Ti.UI.createTableView({\r\n data: tableData\r\n });\r\n \r\n table.addEventListener('click', function(e){\r\n ContactWindow(e.rowData.contactId).open();\r\n });\r\n v.add(table);\r\n win.add(createButton);\r\n win.add(v);\r\n \r\n return win;\r\n}\r\n \r\nMainWindow().open();\r\n{code}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-06-12T11:36:06.000+0000", "updated": "2014-06-12T11:36:06.000+0000" }, { "id": "309481", "author": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed on:\r\nMac OSX 10.9.3\r\nAppcelerator Studio, build: 3.3.0.201406111953\r\nTitanium SDK, build: 3.3.0.v20140617161713\r\nTitanium CLI, build: 3.3.0-rc\r\nAlloy: 1.4.0-rc\r\nBlackBerry SDK, build: 10.2.0.1155\r\nBlackBerry Simulator: 10.3.0.440\r\nBlackBerry Device: 10.2.1.2947\r\n\r\nContact is created successfully.\r\nClosing.", "updateAuthor": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-18T00:08:36.000+0000", "updated": "2014-06-18T00:08:36.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }