{ "id": "90426", "key": "TIMOB-8774", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13277", "name": "Sprint 2012-08", "archived": true, "released": true, "releaseDate": "2012-04-22" }, { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-12T14:54:07.000+0000", "created": "2012-04-17T16:36:15.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "qe-testadded", "regression" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "18764", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "94709", "key": "TIMOB-9912", "fields": { "summary": "Android: Label: Application crashes on updating textid of label with a key that missing", "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 } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-16T23:55:23.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": "h2. Problem description\r\nChanging label textid property causes the label to disappear.\r\n\r\nh2. Steps to reproduce and sample code\r\n\r\n- Create a window, put a label with textid property.\r\n- Add an event listener on the label (or on the view) in order to modify the textid content\r\n- Click and trigger the eventListener\r\nResult: 'textid' content changed as expected\r\n- Click again\r\nResult: label disappears\r\n\r\nSee attached sample code:\r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n\t\t\t\t\tbackgroundColor:'white',\r\n\t\t\t\t\ttitle:'window',\r\n\t\t\t\t\tbarColor:'#ff7b01',\r\n\t\t\t\t\ttop:0\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\tvar view = Ti.UI.createView({\r\n\t\t\ttop:0,\r\n\t\t\theight:80,\r\n\t\t\tright:0,\r\n\t\t\tleft:0\r\n\t\t});\t\r\n\t\t\r\n\t\t\r\nvar label = Ti.UI.createLabel({\r\n\tfont:{fontSize:30,fontFamily:'Helvetica Neue'},\r\n\tcolor:'red',\r\n\tleft:0,\r\n\twidth:'100%',\r\n\ttext:'Label1',\r\n\tright:'10%',\r\n\ttextid:'check'\r\n});\r\n\t\r\n\tview.add(label);\r\n\tview.addEventListener('click',function(e){\r\n\t\tlabel.text = 'Label1 is fine';\r\n\t\tlabel.textid='new';\r\n\t\t// alert(label.textid);\r\n\t})\r\n\t\t\t\r\nwin.add(view)\r\n\t\t\t\t\r\nwin.open();\r\n\t\t\t\r\n{code}\r\n\r\nh2. Additional notes\r\nNot able to reproduce on 1.7.6", "attachment": [], "flagged": false, "summary": "Android: issues displaying labels and changing properties if using textid", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 2.0.1 and 1.8.2\r\nAndroid OS", "comment": { "comments": [ { "id": "191691", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "textId and text properties cannot be used at the same time. One will overwrite the other. Setting textId will cause a resource lookup on that key (a key defined in Android resources), and set the label's text to the corresponding value. If this key is undefined, the text is set to an empty string. I will submit a PR with a fix such that if the key is undefined, we will not MODIFY the existing text, i.e not setting it to an empty string. Please look at http://docs.appcelerator.com/titanium/2.0/#!/api/Titanium.UI.Label for more details.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-18T15:05:32.000+0000", "updated": "2012-04-18T15:06:28.000+0000" }, { "id": "194016", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 2.0.2.v20120505151714 with Samsung Nexus S 4.0.4", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-07T14:53:31.000+0000", "updated": "2012-05-07T14:53:31.000+0000" }, { "id": "202424", "author": { "name": "etcarev", "key": "etcarev", "displayName": "Evgenii Tcarev", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Occurs with Xoom tablet running 4.0.3 using SDK 2.1.1.v20120705143056 and SDK 2.1.0GA.\r\n\r\n", "updateAuthor": { "name": "etcarev", "key": "etcarev", "displayName": "Evgenii Tcarev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-10T14:37:52.000+0000", "updated": "2012-07-10T14:37:52.000+0000" }, { "id": "202446", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fix for this needs to backport into 2.1.1.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-10T16:02:19.000+0000", "updated": "2012-07-10T16:02:19.000+0000" }, { "id": "207980", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Environment used for verification -\r\nTested with Titanium SDK: 2.1.1.v20120716180600\r\nTested with Titanium  Studio: 2.1.1.201207161421\r\nDevice - Android Emulator 2.3.3\r\nMachine OS - MAC 10.7.3", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-07-16T23:55:23.000+0000", "updated": "2012-07-16T23:55:23.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }