{ "id": "162318", "key": "TIMOB-23712", "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": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-08-02T15:25:25.000+0000", "created": "2016-08-01T18:28:31.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "qe-5.4.0", "qe-6.0.0" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "issuelinks": [ { "id": "52315", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "159783", "key": "ALOY-1494", "fields": { "summary": "iOS: Support Ti.UI.iOS.Stepper in Alloy", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "52314", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "83084", "key": "TIMOB-6305", "fields": { "summary": "iOS: Add Stepper UI element", "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": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-09-15T08:57:25.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The default value for Ti.UI.IOS.Stepper.value is null, when it should be 0 according to: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIStepper_Class/index.html#//apple_ref/occ/instp/UIStepper/value\r\n\r\n*Steps to Reproduce Issue*:\r\n1. Create a new Alloy project\r\n2. Use the below code to demonstrate the issue\r\n3. Run the project and click on \"OK\"\r\n\r\n*Actual Results*\r\nThe value is output as null\r\n\r\n*Expected Results*\r\nThe value is output as 0\r\n\r\n*Notes*\r\nThis impacts trying to decrement the stepper on first click. Trying to increment the stepper sets it to the step value.\r\n\r\n*Code*:\r\n*index.xml*\r\n{code}\r\n\r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n*index.js*\r\n{code}\r\nfunction doClick(e) {\r\n Ti.API.info($.stepper.value);\r\n}\r\n\r\nfunction btnClick(e) {\r\n Ti.API.info($.stepper.value);\r\n}\r\n\r\n$.index.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: Ti.UI.IOS.Stepper.value does not default to correct value", "creator": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "MacOS 10.11.5 (15F31a)\r\nTi SDK 5.4.0.v20160801022303\r\nAppc NPM 4.2.7\r\nAppc CLI 5.4.0-37\r\nAlloy 1.9.1\r\nXcode 7.3.1 (7D1014)", "comment": { "comments": [ { "id": "392201", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8186\r\n\r\nDemo Code:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar stepper = Ti.UI.iOS.createStepper({\r\n top: 20,\r\n tintColor:\"green\",\r\n steps:3,\r\n maximum:30,\r\n minimum:0\r\n});\r\n\r\nvar button = Titanium.UI.createButton({\r\n title: 'Get Value',\r\n top: \"50%\",\r\n middle: 0,\r\n width: 100,\r\n height: 50\r\n});\r\n\r\nbutton.addEventListener(\"click\",function(e){\r\n alert(stepper.value); // or (stepper.getValue())\r\n});\r\n\r\nwin.add(button);\r\nwin.add(stepper);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-08-02T15:03:33.000+0000", "updated": "2016-08-02T15:03:33.000+0000" }, { "id": "396195", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, Ti.UI.IOS.Stepper.value default value is 0.\r\n\r\nTested On:\r\niPhone 6 Plus 10.0.1 Device & Simulator\r\niPhone 5S 9.3.5 Device\r\nMac OSX El Capitan 10.11.6\r\nTi SDK: 6.0.0.v20160914165725\r\nAppc Studio: 4.8.0.201609101003\r\nAppc NPM: 4.2.8-6\t\r\nApp CLI: 6.0.0-42\t\r\nXcode 8.0 \r\nNode v4.4.7\r\n\r\n*Closing ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-09-15T08:57:05.000+0000", "updated": "2016-09-15T08:57:05.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }