{ "id": "117147", "key": "ALOY-742", "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": "15402", "description": "Alloy 1.2.0, concurrent with SDK 3.1.0", "name": "Alloy 1.2.0", "archived": false, "released": true, "releaseDate": "2013-08-15" }, { "id": "15530", "description": "2013 Sprint 14", "name": "2013 Sprint 14", "archived": true, "released": true, "releaseDate": "2013-07-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-07-12T19:12:29.000+0000", "created": "2013-07-12T18:27:43.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "15402", "description": "Alloy 1.2.0, concurrent with SDK 3.1.0", "name": "Alloy 1.2.0", "archived": false, "released": true, "releaseDate": "2013-08-15" } ], "issuelinks": [], "assignee": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-07-12T20:01:52.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" }, { "id": "13604", "name": "Tooling", "description": "Items related to Alloy tooling and workflow" } ], "description": "ENVIRONMENT:\r\nMac OS X 10.7.5\r\nAlloy 1.2.0 (Thu Jul 11 19:19:59/05d8ac922791043cf383d79993a4a2965325edc4)\r\n\r\nREPRODUCTION:\r\nCreate a default Alloy project.\r\n\r\nRun 'alloy generate style index' twice.\r\n--> On the second attempt, you receive a warning that the file already exist.\r\n\r\nRun 'alloy generate style app' twice (or use a name with no associated view-controller)\r\n--> On the second attempt, the Alloy CLI overwrites the file with the skeleton version.\r\n\r\nEXPECTED RESULT:\r\n\r\nThe command should not overwrite an existing file.\r\n\r\n{panel}\r\nsavoytruffle:AlloyTestDynamicStyling bhatfield$ alloy generate -b style index\r\n[INFO] Generated style named index\r\nsavoytruffle:AlloyTestDynamicStyling bhatfield$ alloy generate -b style index\r\n[WARN] Style named index already up-to-date\r\nsavoytruffle:AlloyTestDynamicStyling bhatfield$ alloy generate -b style app\r\n[INFO] Generated style named app\r\nsavoytruffle:AlloyTestDynamicStyling bhatfield$ alloy generate -b style app\r\n[INFO] Generated style named app\r\n{panel}\r\n\r\n", "attachment": [], "flagged": false, "summary": "CLI: alloy generate style command does not check for the existence of the global style or files without view-controllers before overwriting it", "creator": { "name": "bhatfield", "key": "bhatfield", "displayName": "Benjamin Hatfield", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "bhatfield", "key": "bhatfield", "displayName": "Benjamin Hatfield", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "261661", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/alloy/pull/177\r\n\r\nFunctional test passes by following these steps:\r\n\r\n# create a default alloy app\r\n# execute {{alloy generate style app}}, which should generate a default app.tss\r\n# execute {{alloy generate style app}} again, which should now throw an error indicating that the file already exists.\r\n# execute {{alloy generate style foo}}, which should generate a default foo.tss\r\n# execute {{alloy generate style foo}} again, which should now throw an error indicating that the file already exists.\r\n# Create a \"app/views/foo.xml\" file that contains: {{}}\r\n# execute {{alloy generate style foo}} a third time, which should now update the existing foo.tss file by adding an entry for \"#bar\"", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-12T19:12:29.000+0000", "updated": "2013-07-12T19:12:29.000+0000" }, { "id": "261669", "author": { "name": "bhatfield", "key": "bhatfield", "displayName": "Benjamin Hatfield", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR passed. Receiving error for files (with no view-controllers) that already exist and correctly updating styles when new id or class attributes are added to markup files.", "updateAuthor": { "name": "bhatfield", "key": "bhatfield", "displayName": "Benjamin Hatfield", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-12T20:01:44.000+0000", "updated": "2013-07-12T20:01:44.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }