{ "id": "104463", "key": "AC-2072", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-04-03T22:39:40.000+0000", "created": "2012-11-06T17:39:33.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41: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": [], "description": "Anvil test fails on \r\nsuite: ui_layout\r\ntest: convertUnits\r\nwith message:\r\nconvertUnits - 67ms - error - Message: should be: '0', was: 'NaN'\r\n\r\nFix:\r\nin file titanium\\Ti\\UI.js\r\nin function convertUnits\r\nchange 1st line to:\r\n// even if result is NaN - convert it to 0;\r\nvar intermediary = +(dom.computeSize(convertFromValue, 0, false)) || 0; \r\n", "attachment": [], "flagged": false, "summary": "Ti.UI.convertUnits returns NaN", "creator": { "name": "stanislav fedorenko (gl)", "key": "stanislav fedorenko (gl)", "displayName": "Stanislav Fedorenko", "active": true, "timeZone": "Europe/Helsinki" }, "subtasks": [], "reporter": { "name": "stanislav fedorenko (gl)", "key": "stanislav fedorenko (gl)", "displayName": "Stanislav Fedorenko", "active": true, "timeZone": "Europe/Helsinki" }, "environment": null, "comment": { "comments": [ { "id": "228576", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please can you provide some more information about this? What's \"Anvil test\"? Please could you provide a reproducible test case? Thanks!", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-27T00:27:52.000+0000", "updated": "2012-11-27T00:27:52.000+0000" }, { "id": "233511", "author": { "name": "stanislav fedorenko (gl)", "key": "stanislav fedorenko (gl)", "displayName": "Stanislav Fedorenko", "active": true, "timeZone": "Europe/Helsinki" }, "body": "This was found in test form suites\\ui_layout.js :\r\n\r\nOn MobileWeb:\r\n{quote}\r\n{noformat} \r\n// Functional Test #1087-#1097\r\nthis.convertUnits = function(testRun) {\r\n//...... skipped ......\r\n// #1097\r\nvalueOf(testRun, Math.round(Ti.UI.convertUnits('abc', Ti.UI.UNIT_PX))).shouldBe(0);\r\n}\r\n{noformat} \r\n{quote}\r\n\r\n\r\nAccording to this test code:\r\nTi.UI.convertUnits('abc', Ti.UI.UNIT_PX)\r\nshould not return NaN. It must return 0.", "updateAuthor": { "name": "stanislav fedorenko (gl)", "key": "stanislav fedorenko (gl)", "displayName": "Stanislav Fedorenko", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2013-01-08T01:55:11.000+0000", "updated": "2013-01-08T02:19:48.000+0000" }, { "id": "245577", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This function is to convert units such as pixels or dips. \"abc\" is not a number, it's a string.", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-03T22:39:40.000+0000", "updated": "2013-04-03T22:39:40.000+0000" }, { "id": "280977", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Invalid issue. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-24T22:18:28.000+0000", "updated": "2013-11-24T22:18:28.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }