{ "id": "155261", "key": "TIMOB-20506", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-10-12T04:16:48.000+0000", "created": "2016-03-02T00:21:01.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios", "list", "properties" ], "versions": [ { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-11-17T18:44:40.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": "When trying to set a list, via \"Ti.App.Properties.setList\", with an object that has a null value property, I get an Application Error: \"Attempt to insert non-property list\"\r\n\r\n\r\n{code:java}\r\nvar names = [{\r\n name: \"One\"\r\n}, {\r\n name: null\r\n}];\r\nTi.App.Properties.setList(\"names\", names);\r\n{code}\r\n\r\nThis error does not happen on Android 6.0.1.\r\n\r\n*Note:* This issue seems similar to [TIMOB-13127]", "attachment": [], "flagged": false, "summary": "iOS: Ti.App.Properties.setList failes when array element is object with null property", "creator": { "name": "jknight@sbmcorp.com", "key": "jknight@sbmcorp.com", "displayName": "Jason Knight", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jknight@sbmcorp.com", "key": "jknight@sbmcorp.com", "displayName": "Jason Knight", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 9.2, iPhone 6s, SDK 5.1.1.GA", "closedSprints": [ { "id": 733, "state": "closed", "name": "2016 Sprint 21 SDK", "startDate": "2016-10-08T00:53:00.000Z", "endDate": "2016-10-22T00:53:00.000Z", "completeDate": "2016-10-24T03:58:08.547Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "378397", "author": { "name": "jknight@sbmcorp.com", "key": "jknight@sbmcorp.com", "displayName": "Jason Knight", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This should be in TIMOB and not TC.", "updateAuthor": { "name": "jknight@sbmcorp.com", "key": "jknight@sbmcorp.com", "displayName": "Jason Knight", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-02T00:26:06.000+0000", "updated": "2016-03-02T00:26:06.000+0000" }, { "id": "394554", "author": { "name": "jknight@sbmcorp.com", "key": "jknight@sbmcorp.com", "displayName": "Jason Knight", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I guess this won't get fixed because nobody else has bothered to report it?", "updateAuthor": { "name": "jknight@sbmcorp.com", "key": "jknight@sbmcorp.com", "displayName": "Jason Knight", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-08-27T06:10:04.000+0000", "updated": "2016-08-27T06:10:04.000+0000" }, { "id": "396007", "author": { "name": "baharroth", "key": "baharroth", "displayName": "Baharroth", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I can report it again. Still in SDK 5.4.0", "updateAuthor": { "name": "baharroth", "key": "baharroth", "displayName": "Baharroth", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-13T13:20:06.000+0000", "updated": "2016-09-13T13:20:06.000+0000" }, { "id": "396034", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (Core-SDK): https://github.com/appcelerator/titanium_mobile/pull/8371\r\nPR (Unit-Test): https://github.com/appcelerator/titanium-mobile-mocha-suite/pull/4\r\n\r\nUsing a generatic attempt too loop through dictionary-values in {{setList}} to convert between {{null}}- and {{NSData}}-values that are required by the internal iOS-API. The test-case contains all kind of possible values, from dictionary (object) over null, undefined, string, number and boolean.\r\n\r\nDemo:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#fff\"\r\n});\r\n\r\nvar btn1 = Ti.UI.createButton({\r\n title: \"Set list\",\r\n top: 30\r\n});\r\n\r\nbtn1.addEventListener(\"click\", function() {\r\n var names = [{\r\n name: \"One\"\r\n }, {\r\n name: 1\r\n }, {\r\n name: \"\"\r\n },\r\n null, {\r\n name: true\r\n }, 1, \"\", null, false];\r\n Ti.App.Properties.setList(\"names\", names);\r\n});\r\n\r\nvar btn2 = Ti.UI.createButton({\r\n title: \"Get list\",\r\n top: 60\r\n});\r\n\r\nbtn2.addEventListener(\"click\", function() {\r\n Ti.API.warn(Ti.App.Properties.getList(\"names\", []));\r\n});\r\n\r\nwin.add(btn1);\r\nwin.add(btn2);\r\nwin.open();\r\n{code}\r\n\r\nExpected result:\r\n- No crashes in getting and setting the property-list\r\n- {{null}}- and {{undefined}}-values are properly accepted in both setter and getter", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-13T18:49:58.000+0000", "updated": "2016-10-07T20:17:39.000+0000" }, { "id": "401459", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\nMacOS 10.12 (16A323)\r\nStudio 4.8.0.201611121409\r\nTi SDK 6.1.0.v20161117072812\r\nAppc NPM 4.2.9-1\r\nAppc CLI 6.1.0-13\r\nAlloy 1.9.4\r\nXcode 8.1 (8B62)\r\n\r\nArrays objects with null/undefined properties can be set and retrieved with setList and getList, without error.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-11-17T18:44:40.000+0000", "updated": "2016-11-17T18:44:40.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }