{ "id": "61628", "key": "TIMOB-996", "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": "13207", "name": "Sprint 2012-07", "archived": true, "released": true, "releaseDate": "2012-04-08" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-21T16:50:31.000+0000", "created": "2011-04-15T02:41:08.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "qe-testadded", "training" ], "versions": [], "issuelinks": [ { "id": "17057", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "inwardIssue": { "id": "86722", "key": "TIDOC-461", "fields": { "summary": "APIDoc: add hasText method in Titanium.UI.TextField, TextArea", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "17060", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "88827", "key": "TIMOB-8303", "fields": { "summary": "iOS: Text Field/Area needs hasText method", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-07T05:31:27.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" } ], "description": "{html}{html}", "attachment": [], "flagged": false, "summary": "Android: Text Field/Area needs hasText method", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "188356", "author": { "name": "chaseculpepper22", "key": "chaseculpepper22", "displayName": "Chase Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "To test the fix for this, create a simple project that has the following code in app.js: \r\n{code}\r\nvar textArea1 = Ti.UI.createTextArea();\r\nvar hasText = textArea1.hasText();\r\nTi.API.log('test','textArea1.hasText() = '+hasText);\r\n\r\nvar textArea2 = Ti.UI.createTextArea({\r\n\tvalue : 'I am a textarea',\r\n});\r\nhasText = textArea2.hasText();\r\nTi.API.log('test','textArea2.hasText() = '+hasText);\r\n\r\nvar textArea3 = Ti.UI.createTextArea({\r\n\tvalue : '',\r\n});\r\nhasText = textArea3.hasText();\r\nTi.API.log('test','textArea3.hasText() = '+hasText);\r\n\r\n\r\nvar\ttextField1 = Ti.UI.createTextField();\r\nhasText = textField1.hasText();\r\nTi.API.log('test','textField1.hasText() = '+hasText);\r\n\r\nvar textField2 = Ti.UI.createTextField({\r\n\tvalue : 'I am a textfield'\r\n});\r\nhasText = textField2.hasText();\r\nTi.API.log('test','textField2.hasText() = '+hasText);\r\n\r\nvar textField3 = Ti.UI.createTextField({\r\n\tvalue : '',\r\n});\r\nhasText = textField3.hasText();\r\nTi.API.log('test','textField3.hasText() = '+hasText);\r\n{code}\r\n\r\nAfter building and running the project, the log should read:\r\n\r\n{code}\r\nI/TiAPI ( 441): [test] textArea1.hasText() = false\r\nI/TiAPI ( 441): [test] textArea2.hasText() = true\r\nI/TiAPI ( 441): [test] textArea3.hasText() = false\r\nI/TiAPI ( 441): [test] textField1.hasText() = false\r\nI/TiAPI ( 441): [test] textField2.hasText() = true\r\nI/TiAPI ( 441): [test] textField3.hasText() = false\r\n{code}", "updateAuthor": { "name": "chaseculpepper22", "key": "chaseculpepper22", "displayName": "Chase Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-23T13:14:16.000+0000", "updated": "2012-03-23T13:36:07.000+0000" }, { "id": "189008", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as Fixed.\r\n\r\nSDK: 2.1.0.v20120328100312\r\nAndroid: V8, Rhino\r\nStudio: 2.0.0.201203271933\r\nOS: Snow Leopard\r\nDevices Tested: Emulator 2.3.3", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-28T10:06:42.000+0000", "updated": "2012-03-28T10:06:42.000+0000" }, { "id": "189479", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening/closing to add/remove labels", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-02T10:15:30.000+0000", "updated": "2012-04-02T10:15:30.000+0000" }, { "id": "193905", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "The test case provided in the comments above causes an exception on iOS and Android", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-06T03:31:35.000+0000", "updated": "2012-05-06T03:31:35.000+0000" }, { "id": "193907", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Test case\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white',\r\n exitOnClose: true,\r\n fullscreen: false,\r\n layout: 'vertical',\r\n title: 'hasText Demo'\r\n});\r\n\r\nvar textField = Ti.UI.createTextField({\r\n color: '#336699',\r\n backgroundColor:'#eee',\r\n top: 10, left: 10,\r\n width: 250, height: 60,\r\n borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED\r\n});\r\nwin.add(textField);\r\n\r\nvar textArea = Ti.UI.createTextArea({\r\n borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n backgroundColor:'#eee',\r\n color: '#336699',\r\n top: 10, left: 10,\r\n width: 250, height: 200\r\n});\r\nwin.add(textArea);\r\n\r\n\r\nwin.open();\r\n\r\ntextField.addEventListener('click', function(e){\r\n\tTi.API.info('hasText? ' + e.hasText());\r\n});\r\n\r\ntextArea.addEventListener('click', function(e){\r\n\tTi.API.info('hasText? ' + e.hasText());\r\n});\r\n{code}", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-06T03:33:31.000+0000", "updated": "2012-05-06T03:33:31.000+0000" }, { "id": "195549", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The test case is actually invalid. The event object for click doesn't have a hasText() method. Instead, you should be using e.source.hasText(). I tested this on the lastest master build and it works correctly.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-21T16:50:24.000+0000", "updated": "2012-05-21T16:50:24.000+0000" }, { "id": "207649", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "hasText method working on TextField/TextArea.Verified on:\r\nTitanium Studio: 2.1.1.201207121732\r\nTitanium SDK: 2.1.1.v20120712160111\r\nAndroid: V8\r\nDevice: Emulator2.2", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T04:25:32.000+0000", "updated": "2012-07-16T04:25:32.000+0000" }, { "id": "278589", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4863\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-07T05:31:27.000+0000", "updated": "2013-11-07T05:31:27.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }