{ "id": "159582", "key": "TIMOB-23216", "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": [], "resolution": null, "resolutiondate": null, "created": "2016-04-14T16:09:40.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "parity" ], "versions": [], "issuelinks": [ { "id": "51934", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "160129", "key": "TIMOB-23365", "fields": { "summary": "Windows: Alloy, Unable to Bind to Visible Tag on Windows 8.1 & Windows 10", "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 } } } }, { "id": "51357", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "159581", "key": "TIMOB-23215", "fields": { "summary": "Windows: Data binding: Using attribute in ListItem that is not in data crashes view", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-06-02T18:53:13.000+0000", "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" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" }, { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "I have data binding set up on a ListSection with a transform function. When my transform function return false (not a string, but a boolean) as a variable the databinding actually displays a string \"false\" instead of nothing like it does on iOS and Android", "attachment": [ { "id": "58975", "filename": "iPhone_6s_Plus_OS_9_2.png", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-18T06:36:13.000+0000", "size": 16337, "mimeType": "image/png" }, { "id": "58976", "filename": "Nexus_One_API_23.png", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-18T06:36:13.000+0000", "size": 30033, "mimeType": "image/png" }, { "id": "58977", "filename": "Windows_8_1.png", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-18T06:36:13.000+0000", "size": 16025, "mimeType": "image/png" } ], "flagged": false, "summary": "Windows: Data binding: returning false displays false", "creator": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "environment": "windows phone", "comment": { "comments": [ { "id": "382800", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~topener] I don't quite get the issue but you mean you did transform the ListView? Could you give us a sample code so we can reproduce the issue on our side? ", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-15T04:40:39.000+0000", "updated": "2016-04-15T04:40:39.000+0000" }, { "id": "382826", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "{code}\r\nfunction transform(model){\r\n return {\r\n description: false\r\n}\r\n}\r\n{code}\r\n\r\nWhen using this in the view:\r\n\r\n{code}\r\n\r\n{code}\r\n\r\nit will display the string \"false\" instead of nothing", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-15T13:53:57.000+0000", "updated": "2016-04-15T13:53:57.000+0000" }, { "id": "382830", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Hmm, interesting. And the other platforms just display nothing rather than coercing the boolean to a string value? That seems like our behavior is \"more correct\" here. I mean if you didn't want the description shown, wouldn't you use an empty string?", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-04-15T14:33:29.000+0000", "updated": "2016-04-15T14:33:29.000+0000" }, { "id": "382833", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "iOS and Android display nothing indeed. \"false\" shouldn't be displayed imho as it does on both other platforms", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-15T14:40:28.000+0000", "updated": "2016-04-15T14:40:28.000+0000" }, { "id": "382938", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I don't think we have parity across platforms. I have created a sample code to test how {{true}} and {{false}} rendered in {{ListView}}, {{Label}} and {{Button}} \r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'green', layout:'vertical' });\r\nvar listView = Ti.UI.createListView({\r\n width: Ti.UI.FILL,\r\n height: '50%'\r\n});\r\nvar label_t = Ti.UI.createLabel({\r\n width: Ti.UI.FILL,\r\n height: '10%',\r\n text: true\r\n});\r\nvar label_f = Ti.UI.createLabel({\r\n width: Ti.UI.FILL,\r\n height: '10%',\r\n text: false\r\n});\r\nvar button_t = Ti.UI.createButton({\r\n width: Ti.UI.FILL,\r\n height: '10%',\r\n title: true\r\n});\r\nvar button_f = Ti.UI.createButton({\r\n width: Ti.UI.FILL,\r\n height: '10%',\r\n title: false\r\n});\r\nvar sections = [];\r\n\r\nvar vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables' });\r\nvar vegDataSet = [\r\n { properties: { title: true } },\r\n { properties: { title: false } },\r\n];\r\nvegSection.setItems(vegDataSet);\r\nsections.push(vegSection);\r\n\r\nlistView.sections = sections;\r\nwin.add(listView);\r\nwin.add(label_t);\r\nwin.add(label_f);\r\nwin.add(button_t);\r\nwin.add(button_f);\r\n\r\nwin.open();\r\n{code}\r\n\r\nSo here's how it's rendered.\r\n\r\n!iPhone_6s_Plus_OS_9_2.png|thumbnail! \r\n!Nexus_One_API_23.png|thumbnail! \r\n!Windows_8_1.png|thumbnail! \r\n\r\nAs you can see in the screenshot, \r\n\r\n* iOS renders {{1}} for {{true}}, and {{0}} for {{false}} in every cases.\r\n* Android renders {{empty string}} on ListView for either {{true}} and {{false}}\r\n* Android renders {{\"true\"}} for {{true}}, {{\"false\"}} for {{false}} on Label and Button\r\n* Windows renders {{\"true\"}} for {{true}}, {{\"false\"}} for {{false}} in every cases.\r\n\r\nSo it's obviously a parity issue here but I'm not sure what is the \"right\" way for this.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-18T06:41:21.000+0000", "updated": "2016-04-18T11:30:26.000+0000" }, { "id": "382967", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Be aware of how ALOY-1355 and ALOY-1480 influence these findings.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-04-18T11:41:57.000+0000", "updated": "2016-04-18T11:41:57.000+0000" }, { "id": "384726", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Given the freeze date for 5.4.0 and the fact that this needs more attention from the iOS/Android guys to get parity right, I need to bump it out.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-04T14:46:27.000+0000", "updated": "2016-05-04T14:46:27.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }