{ "id": "121397", "key": "TIMOB-15541", "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": "15703", "description": "2013 Sprint 22", "name": "2013 Sprint 22", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "15704", "description": "2013 Sprint 22 API", "name": "2013 Sprint 22 API", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-10-22T11:27:31.000+0000", "created": "2013-10-18T21:58:14.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "module_listview", "qe-3.2.0", "qe-testadded", "regression" ], "versions": [], "issuelinks": [ { "id": "33269", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "121033", "key": "TIMOB-15451", "fields": { "summary": "iOS: ListView with custom Template in navigationWindow : listItems not displayed first time when calling appendSection()", "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 } } } }, { "id": "32670", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "120049", "key": "TIMOB-15278", "fields": { "summary": "iOS: ListView with custom Template in navigationWindow - listItems not rendered after push/pop", "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": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-02-21T11:36:17.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": "*Details:* If you use listView.appendSection(), then items will not appear in the ListView when opening a new window for the first time.\r\n\r\n*This is a regression as this does not occur on SDK 3.1.3.GA.*\r\n\r\n*Steps to reproduce:*\r\n1. Launch the following app.js code on a iOS device\r\n{code}\r\nvar detailTemplate = {\r\n \r\n childTemplates: [\r\n \r\n { \r\n type: 'Ti.UI.Label', \r\n bindId: 'theName', \r\n properties: { \r\n \r\n color:'black',\r\n font:{fontSize:14,fontWeight:'bold'},\r\n top:1,\r\n left:8,\r\n \r\n }\r\n },\r\n { \r\n type: 'Ti.UI.Label', \r\n bindId: 'theCategorie', \r\n properties: { \r\n \r\n color:'darkGray',\r\n font:{fontSize:14,fontWeight:'bold'},\r\n bottom:1,\r\n left:8,\r\n \r\n }\r\n },\r\n \r\n ]\r\n};\r\n \r\n \r\nvar b1 = Ti.UI.createButton({\r\n title : 'dataset1',\r\n top:20,\r\n});\r\n \r\n \r\nb1.addEventListener('click', function() {\r\n \r\n var data1 = [\r\n \r\n { theName: { text: 'Row 1'},theCategorie:{ text: 'Cat 1'} },\r\n { theName: { text: 'Row 2'},theCategorie:{ text: 'Cat 2'} },\r\n { theName: { text: 'Row 3'},theCategorie:{ text: 'Cat 3'} }\r\n \r\n ];\r\n \r\n \r\n var listSection1 = Titanium.UI.createListSection({items: data1,headerTitle: 'Data1 Custom Item Template'});\r\n // this works\r\n // listView.sections=[listSection1];\r\n \r\n // bug is here\r\n listView.appendSection(listSection1);\r\n rootWin.openWindow(win2);\r\n});\r\n \r\n \r\nvar win1= Ti.UI.createWindow({title:'Custom Item Template'});\r\nwin1.add([b1,]);\r\n \r\n \r\nvar win2 = Ti.UI.createWindow();\r\n \r\nvar listView = Titanium.UI.createListView(\r\n \r\n {templates: { 'detailTemplate':detailTemplate },\r\n defaultItemTemplate: 'detailTemplate',\r\n }\r\n);\r\n \r\n \r\nlistView.addEventListener('itemclick', function(e){\r\n \r\n //alert ( JSON.stringify(e));\r\n Ti.API.info(JSON.stringify(e));\r\n var item = e.section.getItemAt(e.itemIndex);\r\n Ti.API.info(JSON.stringify(item));\r\n \r\n \r\n});\r\n \r\nwin2.add(listView);\r\n \r\nvar rootWin = Ti.UI.iOS.createNavigationWindow({window:win1});\r\nrootWin.open();\r\n{code}\r\n\r\n2. Press on \"dataset1\"\r\n\r\n*Actual:* Items do not appear (see no_items.png). But, if you go back and press \"dataset1\" again, then items will appear.\r\n\r\n*Expected:* If you uncomment line 53 and comment line 56, then items should appear after pressing on \"dataset1\" for the first time (see items.png)", "attachment": [ { "id": "43305", "filename": "items.png", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-18T21:58:14.000+0000", "size": 41120, "mimeType": "image/png" }, { "id": "43306", "filename": "no_items.png", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-18T21:58:14.000+0000", "size": 25862, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: ListView - appendSection() will not display items in the ListView when opening a new window for the first time", "creator": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio, build: 3.2.0.201310180511\r\nSDK build: 3.2.0.v20131018121230 \r\nOS: Mac OS X Mountain Lion (10.8.5)\r\nDevices: iphone 4 (5.1.1), iphone 5 (7.0.2)", "comment": { "comments": [ { "id": "275983", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending against master\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4816", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-21T18:39:07.000+0000", "updated": "2013-10-21T18:39:07.000+0000" }, { "id": "276310", "author": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test Environment - \nAppc Studio - 3.2.0.201310181700\nSDK - 3.2.0.v20131022171645\nacs -1.0.7\nalloy - 1.2.2\ntitanium - 3.2.0\ntitanium-code-processor - 1.0.3\nXcode - 5.0.1\nOS - Mac OS X Mavericks (10.9)\nDevices - iPodTouch1 (v7.0.2), iPhone4S (v5.1)\nResult - Now ListView - appendSection() display items in the listview on opening first time. Hence closing this issue.", "updateAuthor": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-23T07:00:09.000+0000", "updated": "2013-10-23T07:00:09.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }