{ "id": "137295", "key": "ALOY-1149", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "16595", "name": "Alloy 1.5.1", "archived": false, "released": true, "releaseDate": "2014-10-01" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-10-02T21:15:15.000+0000", "created": "2014-09-26T22:33:46.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-3.4.0", "qe-manualtest", "regression" ], "versions": [ { "id": "15909", "description": "Alloy 1.5.0", "name": "Alloy 1.5.0", "archived": false, "released": true, "releaseDate": "2014-09-29" } ], "issuelinks": [ { "id": "42458", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "137601", "key": "ALOY-1154", "fields": { "summary": "Consider deep merging only font properties, not gradients, etc.", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2014-11-19T00:07:39.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": "13603", "name": "Styling", "description": "TSS, dynamic styling, styling API" } ], "description": "h5. Problem description\r\nGradients contain properties as array, for example the 'color' property. \r\nIn Alloy, those properties are now converted and passed as objects and an app is crashing if using those properties. \r\n\r\nThe issue seems to be introduced after ALOY-1051 as is not reproducible using Alloy version 1.4.1 (and Alloy 1.5.0-rc3 as well - see ALOY-1146, where a regression was introduced breaking Aloy-1051), but is reproducible with Alloy 1.5.0-rc, 1.5.0-rc2 and 1.5.0-rc5.\r\nIs therefore a regression.\r\n\r\nh5. Steps to reproduce\r\n1. Grab the sample code for ALOY-717 : https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-717\r\n2. Run the sample app on iOS (any version)\r\nResult: App crashes with an \"Application Error - Invalid type passed to function at alloy.js\"\r\nSee error log attached and screenshot. \r\n\r\n3. Edit index.tss and comment the 'colors' property for .bgGradient class:\r\n{code}\r\n'.bgGradient': {\r\n\tbackgroundGradient: {\r\n\t\ttype: 'linear',\r\n startPoint: { x: '0%', y: '50%' },\r\n endPoint: { x: '100%', y: '50%' },\r\n // colors: [\r\n \t// { color: 'red', offset: 0.0},\r\n \t// { color: 'blue', offset: 0.25 },\r\n \t// { color: 'red', offset: 1.0 }\r\n // ],\r\n\t}\r\n}\r\n{code}\r\nand run on iOS devices\r\nResult: app runs fine and no error are thrown. \r\n", "attachment": [ { "id": "51650", "filename": "gradient_error_log.txt", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-26T22:33:46.000+0000", "size": 875, "mimeType": "text/plain" }, { "id": "51651", "filename": "IMG_0452.PNG", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-26T22:33:46.000+0000", "size": 67830, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Gradient array properties are converted into objects", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.4.0.v20140925113317 \r\nAppcelerator Studio 3.4.0.201409231834\r\nCLI 3.4.0-rc4\r\nAlloy 1.5.0-rc5\r\nXcode6", "closedSprints": [ { "id": 228, "state": "closed", "name": "2014 Sprint 20 Alloy", "startDate": "2014-09-29T13:30:47.322Z", "endDate": "2014-10-13T13:30:00.000Z", "completeDate": "2014-10-13T18:08:16.541Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "326143", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR for 1_5_X https://github.com/appcelerator/alloy/pull/579\r\n\r\nSince arrays as members of an object seem to be the trigger for this issue, it's probably best to test with any attributes that accept arrays:\r\n\r\nAttributes that accept objects with nested arrays: \r\n* backgroundGradient\r\n* attributedString\r\n\r\nAttributes that accept arrays of strings:\r\n* emailDialog.toRecipients, ccRecipients, bccRecipients\r\n", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-09-29T18:27:40.000+0000", "updated": "2014-09-29T18:27:40.000+0000" }, { "id": "326611", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR merged in prep for a 1.5.1-rc release", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-10-01T18:14:48.000+0000", "updated": "2014-10-01T18:14:48.000+0000" }, { "id": "326823", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed\r\n\r\nTiSDK 3.4.0.GA\r\nAppcelerator Studio 3.4.0.GA\r\nCLI 3.4.0.GA\r\nAlloy 1.5.1-rc\r\nXcode 6 - iPhone 5, iPhone 6 (iOS 8), Android and MobileWeb\r\n\r\nClosing. ", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-02T21:10:37.000+0000", "updated": "2014-10-02T21:13:29.000+0000" }, { "id": "326828", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note: With this change, backgroundGradient properties will not be deep merged when using Dynamic Styles as they would be if specified in the TSS/XML files. The last style applied wins.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-02T21:25:39.000+0000", "updated": "2014-10-02T21:25:39.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }