{ "id": "160915", "key": "TIMOB-23520", "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": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2016-06-17T02:57:09.000+0000", "created": "2016-06-08T13:11:26.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "parseInt" ], "versions": [ { "id": "17707", "name": "Release 5.3.0", "archived": false, "released": true, "releaseDate": "2016-06-04" } ], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2017-03-24T18:01:01.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": "10202", "name": "Android", "description": "Android Platform" } ], "attachment": [], "flagged": false, "summary": "Android: parseInt() works in octal instead of decimal", "creator": { "name": "CREATIVE KAIZEN", "key": "creative kaizen", "displayName": "CREATIVE KAIZEN", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "CREATIVE KAIZEN", "key": "creative kaizen", "displayName": "CREATIVE KAIZEN", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "5.3.0GA,\r\nMac OSX", "closedSprints": [ { "id": 649, "state": "closed", "name": "2016 Sprint 13 SDK", "startDate": "2016-06-18T00:25:17.303Z", "endDate": "2016-07-02T00:25:00.000Z", "completeDate": "2016-07-04T04:25:16.889Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "387910", "author": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\nI am able to reproduce this issue with given code and given step.\r\n*Steps:*\r\n1. Create a default classic project with folloing code.\r\n{code}\r\nvar win= Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nwin.open();\r\n\r\nfor(var i = 0; i < 10; ++i)\r\n{ \r\n\tvar text = '0' + i; \r\n\tTi.API.info(parseInt(text)); \r\n} \r\n{code}\r\n2. Build and run the app on android device.\r\nFollowing log is produced:\r\n{code}\r\n[INFO] : 0\r\n[INFO] : 1\r\n[INFO] : 2\r\n[INFO] : 3\r\n[INFO] : 4\r\n[INFO] : 5\r\n[INFO] : 6\r\n[INFO] : 7\r\n[INFO] : 0\r\n[INFO] : 0\r\n{code}\r\n\r\nThanks\r\n\r\n*Environment*:\r\n\r\n*Device info:* HTC One (android 4.4.3)\r\n*Node.js Version:* 0.12.7\r\n*npm Version:* 2.11.3\r\n*Titanium SDKs:* 5.3.0.GA\r\n*Java Development Kit Version:* 1.8.0_73\r\n*Titanium CLI Version:* 5.0.5\r\n*Appcelerator CLI Version:* 5.2.2\r\n*Appcelerator Studio:* 4.5.0\r\n", "updateAuthor": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2016-06-09T04:57:17.000+0000", "updated": "2016-06-09T04:57:17.000+0000" }, { "id": "388514", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~CREATIVE KAIZEN] This is a native javascript behaviour.\r\nHere's a related link: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt\r\n{quote}radix: Always specify this parameter to eliminate reader confusion and to guarantee predictable behavior. Different implementations produce different results when a radix is not specified, usually defaulting the value to 10.{quote}\r\n\r\nThe best solution for this for now is thus {code} parseInt(text,10) {code}. Which is to specify the radix as base 10 aka decimal.\r\n\r\nThis behavior will be updated to match the default expectation of decimal in the near future.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-06-17T02:56:19.000+0000", "updated": "2016-06-17T03:06:08.000+0000" }, { "id": "388515", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "I'm going to resolve this ticket.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-06-17T02:56:54.000+0000", "updated": "2016-06-17T02:56:54.000+0000" }, { "id": "415608", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T18:01:01.000+0000", "updated": "2017-03-24T18:01:01.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }