{ "id": "131161", "key": "ALOY-1036", "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": "15909", "description": "Alloy 1.5.0", "name": "Alloy 1.5.0", "archived": false, "released": true, "releaseDate": "2014-09-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-06-10T17:37:26.000+0000", "created": "2014-06-03T00:27:00.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-closed-3.4.0", "qe-manualtest", "qe-testadded", "styling" ], "versions": [ { "id": "15758", "description": "Alloy 1.4.0", "name": "Alloy 1.4.0", "archived": false, "released": true, "releaseDate": "2014-07-17" } ], "issuelinks": [], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2014-08-20T10:04:02.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\nCustomTSS comma-separated queries are not correctly applied since the boolean operator used in this case is an AND instead of an OR.\r\n\r\nh5. Steps to reproduce\r\n\r\nh6. Sample code\r\n// index.xml\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\r\n{code}\r\n\r\n// app.tss\r\n{code}\r\n\"Label\":{\r\n\tfont:{\r\n\t\tfontSize:'22dp'\r\n\t},\r\n\tcolor:'purple'\r\n}\r\n\r\n\".classLabel\":{\r\n\ttext:\"Simple class label applied\"\r\n}\r\n\r\n\".classLabel[platform=ios,android formFactor=tablet,handheld if=Alloy.Globals.custom1,Alloy.Globals.custom2]\":{\r\n\ttext:\"iOS or Android! Styles conditionals correctly applied\"\r\n}\r\n{code}\r\n\r\n// alloy.js\r\n{code}\r\nAlloy.Globals.custom1 = true;\r\nAlloy.Globals.custom2 = false;\r\n{code}\r\n\r\nh5. Steps\r\n1. Run the sample code either on iOS or Android\r\nResult: Label text is \"Simple class label applied\"\r\nExpected result: Label text should be \"iOS or Android! Styles conditionals correctly applied\"\r\nStyle conditional is not satisfied as custom2 is false and \"if=Alloy.Globals.custom1,Alloy.Globals.custom2\" returns false (should be true).\r\n\r\n2. Change \"Alloy.Globals.custom2\" from false to true. Run on either iOS or Android.\r\nResult: Label text is \"iOS or Android! Styles conditionals correctly applied\", since both are true and the AND operator returns true. ", "attachment": [], "flagged": false, "summary": "CustomTSS: Comma-separated queries are using wrong operator AND instead of OR", "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.3.0.v20140530163312\r\nAlloy 1.4.0-beta\r\nAppcelerator Studio 3.3.0.201405271647\r\nCLI 3.3.0-beta2", "closedSprints": [ { "id": 142, "state": "closed", "name": "2014 Sprint 12 Alloy", "startDate": "2014-06-09T16:00:25.715Z", "endDate": "2014-06-23T16:00:00.000Z", "completeDate": "2014-06-23T14:35:50.386Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "308281", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR https://github.com/appcelerator/alloy/pull/442\r\n\r\nTest app: Use https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-1036\r\n\r\nFunctional test\r\n\r\n1. Build the the 1036 test app. You should see two labels: the first to say \"iOS or Android! Styles conditionals correctly applied\" and the second to say \"Add in XML\"\r\n2. Modify alloy.js setting both global variables true. The build the app. You should see the same two labels.\r\n3. Modify alloy.js setting both global variables false. The build the app. You should see just one label with the text \"Simple class label applied\".\r\n4. Build the https://github.com/appcelerator/alloy/tree/master/test/apps/advanced/custom_tss_queries app. It should run without errors and apply styles as described by the alloy.js and TSS classes.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-06-10T17:36:24.000+0000", "updated": "2014-06-10T17:36:24.000+0000" }, { "id": "308282", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Reopening to adjust time", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-06-10T17:36:50.000+0000", "updated": "2014-06-10T17:36:50.000+0000" }, { "id": "308283", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Re-resolving with updated time", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-06-10T17:37:26.000+0000", "updated": "2014-06-10T17:37:26.000+0000" }, { "id": "319444", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified with:\r\n\r\nAppc Studio - 3.4.0.201408180158 \r\nSDK - 3.4.0.v20140819094113 \r\nacs - 1.0.16 \r\nalloy - 1.5.0-dev \r\nnpm - 1.3.2 \r\ntitanium - 3.4.0-dev \r\ntitanium-code-processor - 1.1.1 \r\nOS - mavericks (v10.9.4) \r\nXcode - 6Beta5\r\nDevice - iPhone5s(v8.0), Nexus7(v4.4.4)\r\n\r\nTested both the apps (test/apps/testing/ALOY-1036 and https://github.com/appcelerator/alloy/tree/master/test/apps/advanced/custom_tss_queries). Both apps run without error and as expected.\r\nHence closing the issue.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-20T10:04:02.000+0000", "updated": "2014-08-20T10:04:02.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }