{ "id": "141382", "key": "TIMOB-18173", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-01-06T20:42:15.000+0000", "created": "2014-12-10T09:09:01.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-01-16T23:14:56.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "This is not a regression as it is reproducible with Titanium sdk 3.4.1\r\n\r\nWhen a new contact is added to the device, adding the date property along with it, following the format in the docs gives error. \r\n\r\nWhen the following is done: \r\n{code}\r\n var 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{code}\r\n it cause the error mentioned in step 1 of the actual results, however adding the date property separately as follows: \r\n{code}\r\n person.date = {\r\n anniversary: ['2022-11-11T11:23:30.000+0000'],\r\n other: ['2003-04-02T12:00:00.000+0000']\r\n };\r\n{code}\r\ndoes not cause any error, however the contact does not get added to the device contacts.\r\n\r\nThe birthday field works fine though it also follows the same format as the date. \r\n\r\n \r\n\r\nSteps to reproduce: \r\n1. Run the attached app.js\r\n2. Open device contacts and check for Ade Crude\r\n\r\nActual results:\r\n1. The following error is shown: \r\n{code}\r\n[ERROR] : Script Error {\r\n[ERROR] : column = 42;\r\n[ERROR] : line = 39;\r\n[ERROR] : message = \"-[__NSCFConstantString countByEnumeratingWithState:objects:count:] unrecognized selector sent to instance 0x5d7014\";\r\n[ERROR] : sourceURL = \"file:///private/var/mobile/Containers/Bundle/Application/1CCC7A89-6FEA-4909-8277-AA526270ABE2/timob9589.app/app.js\";\r\n[ERROR] : stack = \"[native code]\\ncreateUpdateContact@file:///private/var/mobile/Containers/Bundle/Application/1CCC7A89-6FEA-4909-8277-AA526270ABE2/timob9589.app/app.js:39:42\\nglobal code@file:///private/var/mobile/Containers/Bundle/Application/1CCC7A89-6FEA-4909-8277-AA526270ABE2/timob9589.app/app.js:14:21\";\r\n[ERROR] : }\r\n{code}\r\n2. No new contacts added\r\n\r\nExpected results:\r\n1. Blank white screen appears\r\n2. 'Ade Crude' is added to the contacts along with the anniversary dates and other details mentioned in app.js", "attachment": [ { "id": "53145", "filename": "app.js", "author": { "name": "vchidambaram", "key": "vchidambaram", "displayName": "Visalakshi Chidambaram", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2014-12-10T09:09:01.000+0000", "size": 2802, "mimeType": "text/javascript" } ], "flagged": false, "summary": "iOS: adding date property for Ti.Contacts.createPerson causes error ", "creator": { "name": "vchidambaram", "key": "vchidambaram", "displayName": "Visalakshi Chidambaram", "active": true, "timeZone": "Asia/Shanghai" }, "subtasks": [], "reporter": { "name": "vchidambaram", "key": "vchidambaram", "displayName": "Visalakshi Chidambaram", "active": true, "timeZone": "Asia/Shanghai" }, "environment": "Appc-Studio: 3.4.1.201410281743 \r\nTitanium SDK: 3.5.0.v20141208122514 \r\nTitanium CLI: 3.4.1 \r\nAlloy : 1.5.1 GA \r\nOS: Mac OSX 10.10 \r\nXcode: 6.1 \r\nDevice: iPad Air 2 (iOS8.1)", "closedSprints": [ { "id": 291, "state": "closed", "name": "2015 Sprint 01 SDK", "startDate": "2015-01-03T01:00:00.000Z", "endDate": "2015-01-17T01:00:00.000Z", "completeDate": "2015-01-19T17:24:40.828Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "337783", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR here: https://github.com/appcelerator/titanium_mobile/pull/6533", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-05T08:42:29.000+0000", "updated": "2015-01-05T08:42:29.000+0000" }, { "id": "339520", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.10.1\r\nAppcelerator Studio, build: 3.4.1.201410281743\r\nTitanium SDK build: 3.6.0.v20150116070927\r\nTitanium CLI, build: 3.4.1\r\nAlloy: 1.5.1\r\nXcode 6.1.1\r\niPhone 6 Plus (8.1.1), iPad Air 2 (8.2b4)\r\n\r\nUsing the attached app.js built to both devices. App no longer crashes and the contact is added to the contacts list.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-01-16T22:08:57.000+0000", "updated": "2015-01-16T22:08:57.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }