{ "id": "143384", "key": "TIMOB-18430", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "2015-01-22T18:32:17.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "pinnamuri", "key": "pinnamuri", "displayName": "Praveen Innamuri", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-01-27T18:34:14.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": "10207", "name": "Tooling" } ], "description": "We need the following CLI-based application. It would be a slim layer on top of the existing titanium CLI and assist with rapidly building an application based on a set of example code.\r\n\r\nWhen support/users submit code, they generally place a snippet of code into the description of a ticket. This code is _generally_ a replacement for app.js.\r\n\r\nIn order to test this, users create a new titanium application, paste in the code from the ticket in place of app.js and then run the application. This would formalize a system whereby a user could point the CLI to a particular ticket, it would read in the code attached, and then create a new application based on that. Ultimately, this could tie into one of our automation systems whereby the harness app created is able to read some of the additional metadata as required by https://github.com/appcelerator/titanium_mobile_tests_internal/tree/master/QETemplate/Automated/QE%20Automator.\r\n\r\n# Node.js-based module installable via NPM\r\n# Uses the current titanium CLI version to perform its actions\r\n# Takes command-line arguments to select:\r\n## URL endpoint for code. If given a TIMOB or TC number, could construct the proper URL automatically\r\n## Allows authentication for private tickets\r\n## Selection of alloy or classic application\r\n## Selection of mobile platform, SDK version, etc. If the selected SDK version is not installed, it should do so for the user\r\n# The user would select the proper options, the CLI would download any necessary resources/requirements, create the application, build it, and run it (on device or simulator, as required)\r\n\r\n# If possible, the reproduction environment should be encoded in such a way in JIRA (or the CLI can parse it) such that it can figure out what versions to download and try automatically.\r\n\r\nh2. Example templates:\r\n\r\nNote that the title is used as the relative path from the root. For image resources, it would be interesting to see if we could pull from the attachments. Viewing the source of the generated HTML, it would be challenging to pull the code directly from that (it's ended in a bunch of table rows). It may be better to use the JIRA API and grab the source of the description and parse that directly.\r\n\r\nh3. Classic\r\n{code:title=Resources/app.js}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n\r\nvar label1 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 1',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nwin1.add(label1);\r\n\r\n//\r\n// add tabs\r\n//\r\ntabGroup.addTab(tab1); \r\n\r\n// open tab group\r\ntabGroup.open();\r\n{code}\r\n\r\nh3. Alloy:\r\n\r\n{code:title=app/app.js}\r\nvar createListDataItems = function() {\r\n\t\r\n\tvar depositList = [{\r\n\t\tfaultyLabel:\t\t\"Mazda Miata\",\r\n\t\totherViewLabel2:\t\"$1000.00\"\r\n\t},{\r\n\t\tfaultyLabel:\t\t\"Lotus Elise\",\r\n\t\totherViewLabel2:\t\"$1000.00\"\r\n\t}];\r\n\t\r\n\tvar items = _.map(depositList, function(element) {\r\n\t\tTi.API.debug('element.accountName:' + element.accountName);\r\n\r\n\t\tvar item = {\r\n\t\t \t properties : {\r\n\t\t \t \tsearchableText: element.accountName,\r\n\t\t \t \theight: 75,\r\n\t\t \t },\r\n\t\t \t template: \"faultyTemplate\",\r\n\t\t\t faultyLabel: {text: element.faultyLabel, backgroundColor:\"magenta\"},\r\n\t\t\t otherViewLabel2: {text: element.otherViewLabel2},\r\n\t\t};\r\n\t\treturn item;\r\n\t});\t\r\n\treturn items;\r\n};\r\n$.section.setItems(createListDataItems());\r\n\r\n$.index.open();\r\n{code}\r\n\r\n{code:title=app/index.xml}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t \t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n{code:title=app/index.tss}\r\n\".container\": {\r\n\tbackgroundColor:\"white\"\r\n},\r\n\"#outerView\": {\r\n\tleft: 0,\r\n\tright: 0,\r\n\theight: Ti.UI.SIZE,\r\n\tlayout: \"vertical\"\t\r\n}\r\n\r\n\"#faultyLabel\": {\r\n\tleft: 12,\r\n\ttext: \"dummy text\",\r\n\tbackgroundColor: \"yellow\",\r\n\tright: 12,\r\n\theight: 16,\r\n\tcolor: \"black\",\r\n\tfont: {\r\n\t\t\tfontSize: 16,\r\n\t\t\tfontFamily: \"Helvetica\",\r\n\t\t\tfontWeight: \"bold\"\r\n\t}\r\n}\r\n\r\n\"#otherView\": {\r\n\tleft: 0,\r\n\tright: 0,\r\n\theight: 20,\r\n}\r\n\r\n\"#otherViewLabel1\": {\r\n\tleft: 12,\r\n\twidth: 150,\r\n\ttext: \"Opening Available\",\r\n\theight: 20,\r\n}\r\n\r\n\"#otherViewLabel2\": {\r\n\tright: 0,\r\n\twidth: 150,\r\n\ttextAlign: \"right\",\r\n\theight: 20,\r\n}\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Create CLI-based app to speed reproduction of bugs", "creator": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "340307", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "This is a great idea. \r\n\r\n* Variation in code sample styles that we get currently -- which means we need to force users to adopt a style, or the triage person to clean up. Are there customization options in Jira such that we could provide a template or entry-wizard?\r\n* We get updated code included in comments -- which means it will be the assigned developer's responsibility to update the Description or otherwise flag a specific comment as the relevant sample to use as new samples are added to a ticket. Maybe the triage person would create and attach an app based on the description, which would override the description?\r\n* Multiple samples (sometimes we get working &non-working examples) -- how do we tell them apart (which code block goes with which sample), do we use them all or just the first/last?\r\n* Attached sample apps -- how do we differentiate between attached apps vs. other types of files (logs, screenshots, etc.)\r\n\r\nIs there a corresponding app that helps users generate these sample apps? Some sort of \"export\" tool that would take an app and create the Jira markup necessary to paste into a ticket?", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2015-01-22T21:29:15.000+0000", "updated": "2015-01-22T21:29:15.000+0000" }, { "id": "340330", "author": { "name": "pinnamuri", "key": "pinnamuri", "displayName": "Praveen Innamuri", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This is a very useful feature. I understand that the assignee of the ticket might need to do bodyshop work of making sure that the code snippets are available (with proper title) in the ticket description or comments or in attachments. \r\n\r\nI wish there is a separate section for _code snippets_ to manage the sample code from the users, or multiple code-snippets, or different types of files such as logs, screenshots, attached snippets.", "updateAuthor": { "name": "pinnamuri", "key": "pinnamuri", "displayName": "Praveen Innamuri", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-22T22:43:17.000+0000", "updated": "2015-01-22T22:43:17.000+0000" }, { "id": "340339", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~skypanther] I find the updated samples in comments to be particularly problematic for QE and dev, since you have to read through everything. I would like to encourage a process whereby you really only need to read the description of the ticket for everything you need to know. The comments just provide additional context. I wonder if a tool like this would encourage people to follow that process.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-01-22T23:35:16.000+0000", "updated": "2015-01-22T23:35:16.000+0000" }, { "id": "340353", "author": { "name": "pinnamuri", "key": "pinnamuri", "displayName": "Praveen Innamuri", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Also, we can attach the new sample test app back into the JIRA ticket, that is created through the new CLI ?", "updateAuthor": { "name": "pinnamuri", "key": "pinnamuri", "displayName": "Praveen Innamuri", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-23T00:09:50.000+0000", "updated": "2015-01-23T00:09:50.000+0000" }, { "id": "340444", "author": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "body": "+1 to these comments:\r\nbq. Are there customization options in Jira such that we could provide a template or entry-wizard?\r\nbq. I wish there is a separate section for code snippets to manage the sample code from the users\r\n\r\nI agree there needs to a way to identify runnable sample apps vs. code snippets and the rest (as useful as the rest all may be). A new Jira field would help with that. Perhaps it could take either a single app.js file (Classic), or a collection of index.js/.tss/.xml files (Alloy)? Or, for less work on our part, could we just ask /require developers to attach a complete Ti/Alloy project ZIP as a test case?", "updateAuthor": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-01-23T17:39:34.000+0000", "updated": "2015-01-23T17:39:34.000+0000" }, { "id": "340446", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I would prefer that we encourage (if not force) developers to come up with the smallest, simplest complete application that demonstrates the problem. I also find it very useful if the code is directly in the description as it often can be enough for an experienced developer to understand the problem right there. I would worry that having .zip files of the complete application would have a lot of extraneous files that complicate the issue.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-01-23T17:50:10.000+0000", "updated": "2015-01-23T17:50:10.000+0000" }, { "id": "340501", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "[~ingo] As a proof of concept, I threw together https://github.com/skypanther/jirasample \r\n\r\nSomething like that could be packaged with the CLI or Studio for \"one-button\" generation of Jira-ready pasteable code.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2015-01-24T00:46:50.000+0000", "updated": "2015-01-24T00:46:50.000+0000" }, { "id": "340765", "author": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~skypanther], I like the tool. Would it be possible to paste the output to the clipboard? Then it would be a quick command+v into the (presumably) open Jira ticket window. ", "updateAuthor": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-01-27T16:34:16.000+0000", "updated": "2015-01-27T16:34:16.000+0000" }, { "id": "340793", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "[~tstatler] Great idea. I've updated the tool. By default, output is copied to the clipboard. I haven't yet tested on Windows, though.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2015-01-27T18:34:14.000+0000", "updated": "2015-01-27T18:34:14.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }