{ "id": "155086", "key": "TIMOB-20448", "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": "2017-02-27T01:54:32.000+0000", "created": "2016-02-23T23:44:36.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-6.1.0" ], "versions": [], "issuelinks": [ { "id": "54998", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "outwardIssue": { "id": "167973", "key": "TIMOB-24741", "fields": { "summary": "Android: Using \"transparent\" as a color crashes the app (Regression)", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-05-31T22:29:38.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": "Adding text color to a singular row adds the color to multiple down the list.\r\n\r\n*Steps to reproduce:* \r\n# Use the app.js file below.\r\n\r\n*Actual :*\r\nMultiple rows have red text and it keeps changing.\r\n\r\n*Expected:*\r\nOnly the first row should have red text\r\n\r\n*App.js*\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'black',\r\n});\r\nvar array = [];\r\n\r\nfor (var i = 0; i < 501; i++) {\r\n\tvar obj = {\r\n title : \"Row \"+ i \r\n };\r\n if (i == 0) { \r\n \tobj.color = 'red';\r\n }\r\n array.push(obj);\r\n}\r\n\r\nvar tableview = Titanium.UI.createTableView({\r\n data: array,\r\n});\r\n\r\nwin.add(tableview);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Adding text color to a singular row adds the color to multiple down the list ", "creator": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "environment": "Mac OSX El Capitan 10.11.3\r\nStudio: 4.5.0.201602170821\r\nTi SDK: 5.2.0.GA\r\nAppc NPM: 4.2.3\r\nAppc CLI: 5.2.0.GA\r\n
Xcode 7.2
\r\nNode v4.2.4", "closedSprints": [ { "id": 847, "state": "closed", "name": "2017 Sprint 05 SDK", "startDate": "2017-02-26T17:39:21.095Z", "endDate": "2017-03-12T17:39:00.000Z", "completeDate": "2017-03-12T19:14:38.838Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "377798", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "Not a bug. This is you not understanding how JavaScript works.\r\n\r\nTake a look at the **addRow** function in the comments section. It shows the concept of encapsulates the changes to a row inside a function.\r\n\r\n[https://ti-qa-archive.github.io/question/152853/html-tag-in-a-row]\r\n\r\nI add this to give you a push to solve your own problem, I am not going to give you tech support though. But in essence the idea is create a function to deal with a single instance of each row and return the result - then push that results into your array. You do NOT need to change all your code to match my example.", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2016-02-24T19:12:08.000+0000", "updated": "2016-02-24T19:12:08.000+0000" }, { "id": "377801", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "There's nothing wrong with JS code there, it's Titanium bug (if it hasn't dropped passing JS object as table view row, which I think it has not ... yet).", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-02-24T19:27:38.000+0000", "updated": "2016-02-24T19:27:38.000+0000" }, { "id": "377831", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello [~core13] \r\n\r\nThis is a titanium bug. \r\n\r\nThis ticket was written by our Appcelerator QE intern Josh, and was evaluated by a Senior Quality Engineer and our Senior QE manager prior to submission (which is how we train our interns). \r\n\r\nRegardless of the code used, be it yours, the attached example, or a more simple manual creation of the tableview rows we get the same bad behavior. Perhaps you might consider more carefully the tone of your comments, because to me, your recent comment seems a bit demeaning. \r\n\r\nHere is another sample that shows the same behavior:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'black',\r\n});\r\nvar array = [\r\n {\r\n title : \"Red row\",\r\n color : \"red\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n },{\r\n title : \"Row\" \r\n }\r\n\r\n\r\n];\r\n\r\nvar tableview = Titanium.UI.createTableView({\r\n data: array,\r\n});\r\n\r\nwin.add(tableview);\r\nwin.open();\r\n{code}\r\n", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-02-25T01:10:56.000+0000", "updated": "2016-02-25T01:10:56.000+0000" }, { "id": "401213", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This is no 6.0.0 regression right? Moving it to 6.1.0 for now.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-16T18:49:34.000+0000", "updated": "2016-11-16T18:49:34.000+0000" }, { "id": "407765", "author": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8848", "updateAuthor": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-02-23T18:21:24.000+0000", "updated": "2017-02-23T18:21:24.000+0000" }, { "id": "409501", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "{noformat}\r\nMac OS Version : 10.12.3\r\nAppc CLI : 6.1.0\r\nAppc NPM : 4.2.9-1\r\nNode : v4.6.0\r\nDevice: Nexus 5x(6.0.1) Pixel XL(7.1.1)\r\nEmulator: (6.0), (4.4.2)\r\n{noformat}\r\n\r\nUsing above env passed FR. After merge, the changes are present in SDK {{6.1.0.v20170227120704}}.\r\n*Closing*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2017-03-07T14:59:11.000+0000", "updated": "2017-03-07T14:59:11.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }