{
"id": "162411",
"key": "TIMOB-23734",
"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": "16980",
"description": "New V8",
"name": "Release 6.0.0",
"archived": false,
"released": true,
"releaseDate": "2016-11-15"
}
],
"resolution": {
"id": "1",
"description": "A fix for this issue is checked into the tree and tested.",
"name": "Fixed"
},
"resolutiondate": "2016-08-12T01:55:39.000+0000",
"created": "2016-08-04T09:39:49.000+0000",
"priority": {
"name": "Critical",
"id": "1"
},
"labels": [
"listView",
"qe-5.4.0",
"windowsphone"
],
"versions": [
{
"id": "17706",
"name": "Release 5.4.0",
"archived": false,
"released": true,
"releaseDate": "2016-08-11"
}
],
"issuelinks": [],
"assignee": {
"name": "gmathews",
"key": "gmathews",
"displayName": "Gary Mathews",
"active": true,
"timeZone": "America/Los_Angeles"
},
"updated": "2016-08-17T16:13:54.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": "12642",
"name": "Windows",
"description": "Windows authoring support"
}
],
"description": "affect version - 5_4_X 5.4.0.v20160802165655\r\n\r\n*index.js:*\r\n{code:javascript}\r\nfunction onUpdate() {\r\n\t$.section.updateItemAt(1, {info: {text: 'update'}});\r\n}\r\n\r\n$.section.appendItems([\r\n\t{info: {text: 'title 1'}},\r\n\t{info: {text: 'title 2'}},\r\n\t{info: {text: 'title 3'}}\r\n]);\r\n$.win.open();\r\n{code}\r\n\r\n*index.xml:*\r\n{code:javascript}\r\n\r\n \r\n\t\t\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\t\r\n\r\n{code}\r\n\r\n\r\nin 5_4_X 5.4.0.v20160802165655 updates 2nd elem instead of 1st.\r\nin 5.3.0 working fine",
"attachment": [],
"flagged": false,
"summary": "Windows: section updateItemAt updates wrong item",
"creator": {
"name": "zozo4kin",
"key": "zozo4kin",
"displayName": "Zakhar Zhuravlev",
"active": true,
"timeZone": "America/Los_Angeles"
},
"subtasks": [],
"reporter": {
"name": "zozo4kin",
"key": "zozo4kin",
"displayName": "Zakhar Zhuravlev",
"active": true,
"timeZone": "America/Los_Angeles"
},
"environment": "Nokia Lumia 625",
"closedSprints": [
{
"id": 685,
"state": "closed",
"name": "2016 Sprint 16 SDK",
"startDate": "2016-07-30T00:40:02.939Z",
"endDate": "2016-08-13T00:40:00.000Z",
"completeDate": "2016-08-15T08:00:33.056Z",
"originBoardId": 114
}
],
"comment": {
"comments": [
{
"id": "392505",
"author": {
"name": "hknoechel",
"key": "hansknoechel",
"displayName": "Hans Knöchel",
"active": true,
"timeZone": "Europe/Berlin"
},
"body": "Reopening as a 5.4.0 regression for now, [~gmathews] already looks into it. Thanks!",
"updateAuthor": {
"name": "hknoechel",
"key": "hansknoechel",
"displayName": "Hans Knöchel",
"active": true,
"timeZone": "Europe/Berlin"
},
"created": "2016-08-05T14:25:42.000+0000",
"updated": "2016-08-05T14:25:42.000+0000"
},
{
"id": "392621",
"author": {
"name": "gmathews",
"key": "gmathews",
"displayName": "Gary Mathews",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "I cannot reproduce the issue, this test case seems to work fine\r\n\r\n*TEST CASE #1*\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'blue' }),\r\n section = Ti.UI.createListSection({\r\n headerTitle: 'Letters',\r\n items: [\r\n { properties: { title: '0: A' } },\r\n { properties: { title: '1: A' } },\r\n { properties: { title: '2: C' } },\r\n { properties: { title: '3: D' } }\r\n ]\r\n }),\r\n listView = Ti.UI.createListView({ sections: [section] });\r\n\r\nlistView.addEventListener('click', function (e) {\r\n section.updateItemAt(1, { properties: { title: '1: B' } });\r\n});\r\n\r\nwin.add(listView);\r\nwin.open();\r\n{code}\r\n\r\n*Please note that the item index starts at 0, the first item in the list is at index 0 and not index 1.*",
"updateAuthor": {
"name": "gmathews",
"key": "gmathews",
"displayName": "Gary Mathews",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2016-08-08T15:46:40.000+0000",
"updated": "2016-08-08T22:42:53.000+0000"
},
{
"id": "392623",
"author": {
"name": "zozo4kin",
"key": "zozo4kin",
"displayName": "Zakhar Zhuravlev",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "Of course, I know that array index starts from 0.\r\n\r\nYour example works for me!! But you don't use .xml file. Try MY example! MY EXAMPLE DOESN'T WORK CORRECTLY!!!!",
"updateAuthor": {
"name": "zozo4kin",
"key": "zozo4kin",
"displayName": "Zakhar Zhuravlev",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2016-08-08T16:05:15.000+0000",
"updated": "2016-08-08T16:05:40.000+0000"
},
{
"id": "392650",
"author": {
"name": "htbryant",
"key": "htbryant",
"displayName": "Harry Bryant",
"active": true,
"timeZone": "Europe/London"
},
"body": "I can confirm that this is a valid bug. with [~gmathews]'s test code, the correct item is updated (set to 1, second item in the list). But with [~zozo4kin]'s test code:\r\n\r\n*updateItemAt 0:* Second item is updated.\r\n*updateItemAt 1:* Third item is updated.\r\n*updateItemAt 2:* Runtime Error: Exception Unknown.\r\n\r\nSeems that the indexing is being read incorrectly with Alloy Projects.\r\n\r\nTested on: \r\nWindows 10 Pro \r\nWindows Phone 10.0 (Microsoft Lumia 640 LTE) \r\nAppc Studio: 4.7.0.201607250649\r\nTi SDK: 5.4.0.v20160804185318\r\nAppc NPM: 4.2.7\r\nAppc Core: 5.4.0-40\r\nNode: v4.4.4\r\n\r\n*Reopening Ticket.*",
"updateAuthor": {
"name": "htbryant",
"key": "htbryant",
"displayName": "Harry Bryant",
"active": true,
"timeZone": "Europe/London"
},
"created": "2016-08-08T18:40:41.000+0000",
"updated": "2016-08-08T18:41:57.000+0000"
},
{
"id": "392683",
"author": {
"name": "gmathews",
"key": "gmathews",
"displayName": "Gary Mathews",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "Ah, the problem was the inclusion of a {{headerTitle}}. Apologies.\r\n\r\n*TEST CASE #2*\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'blue' }),\r\n section = Ti.UI.createListSection({\r\n items: [\r\n { properties: { title: '0: A' } },\r\n { properties: { title: '1: A' } },\r\n { properties: { title: '2: C' } },\r\n { properties: { title: '3: D' } }\r\n ]\r\n }),\r\n listView = Ti.UI.createListView({ sections: [section] });\r\n \r\nlistView.addEventListener('click', function (e) {\r\n section.updateItemAt(1, { properties: { title: '1: B' } });\r\n});\r\n \r\nwin.add(listView);\r\nwin.open();\r\n{code}\r\n\r\nmaster: https://github.com/appcelerator/titanium_mobile_windows/pull/808\r\n5_4_X: https://github.com/appcelerator/titanium_mobile_windows/pull/809",
"updateAuthor": {
"name": "gmathews",
"key": "gmathews",
"displayName": "Gary Mathews",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2016-08-08T22:38:42.000+0000",
"updated": "2016-08-08T22:42:37.000+0000"
},
{
"id": "392742",
"author": {
"name": "eharris",
"key": "eharris",
"displayName": "Ewan Harris",
"active": true,
"timeZone": "Europe/Dublin"
},
"body": "Verified using:\r\n\r\nWindows 10 Pro\r\nAppc core: 5.4.0-40\r\nAppc NPM: 4.2.7\r\nTi SDK: 5.4.0.v20160809033140\r\nLumia 930: 10.0\r\nLumia 520: 8.1\r\n\r\nWhen calling section.updateItemAt on a section with no header the correct item is now updated\r\n\r\nClosing ticket",
"updateAuthor": {
"name": "eharris",
"key": "eharris",
"displayName": "Ewan Harris",
"active": true,
"timeZone": "Europe/Dublin"
},
"created": "2016-08-09T18:05:35.000+0000",
"updated": "2016-08-09T18:05:35.000+0000"
},
{
"id": "392833",
"author": {
"name": "zozo4kin",
"key": "zozo4kin",
"displayName": "Zakhar Zhuravlev",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "IT IS NOT WORKING FOR 0 index!\r\n\r\ntry update item at 0 index and ypu will get exception: \r\n\r\nmessage: \"invalid vector subscript\"\r\nnative_stack: [\"JSExportClass::CallNamedFunction\"]",
"updateAuthor": {
"name": "zozo4kin",
"key": "zozo4kin",
"displayName": "Zakhar Zhuravlev",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2016-08-10T09:46:38.000+0000",
"updated": "2016-08-10T09:46:38.000+0000"
},
{
"id": "392839",
"author": {
"name": "eharris",
"key": "eharris",
"displayName": "Ewan Harris",
"active": true,
"timeZone": "Europe/Dublin"
},
"body": "[~zozo4kin] Thanks. I'll reopen this ticket.\r\n\r\nWindows 10 Pro\r\nAppc core: 5.4.0-40\r\nAppc NPM: 4.2.7\r\nTi SDK: 5.4.0.v20160809033140\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'blue' }),\r\n section = Ti.UI.createListSection({\r\n items: [\r\n { properties: { title: '0: A' } },\r\n { properties: { title: '1: A' } },\r\n { properties: { title: '2: C' } },\r\n { properties: { title: '3: D' } }\r\n ]\r\n }),\r\n listView = Ti.UI.createListView({ sections: [section] });\r\n \r\nlistView.addEventListener('click', function (e) {\r\n section.updateItemAt(0, { properties: { title: '1: B' } });\r\n});\r\n \r\nwin.add(listView);\r\nwin.open();\r\n{code}",
"updateAuthor": {
"name": "eharris",
"key": "eharris",
"displayName": "Ewan Harris",
"active": true,
"timeZone": "Europe/Dublin"
},
"created": "2016-08-10T12:14:18.000+0000",
"updated": "2016-08-10T12:14:18.000+0000"
},
{
"id": "392892",
"author": {
"name": "gmathews",
"key": "gmathews",
"displayName": "Gary Mathews",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "master: https://github.com/appcelerator/titanium_mobile_windows/pull/813",
"updateAuthor": {
"name": "gmathews",
"key": "gmathews",
"displayName": "Gary Mathews",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2016-08-10T19:17:17.000+0000",
"updated": "2016-08-10T19:17:17.000+0000"
},
{
"id": "392928",
"author": {
"name": "zozo4kin",
"key": "zozo4kin",
"displayName": "Zakhar Zhuravlev",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "Why 6.0.0 ? =((( It's very critical bug, I'm waiting for it. It was working in 5.3.0 and 5.3.1....",
"updateAuthor": {
"name": "zozo4kin",
"key": "zozo4kin",
"displayName": "Zakhar Zhuravlev",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2016-08-11T07:39:03.000+0000",
"updated": "2016-08-11T07:39:03.000+0000"
},
{
"id": "392929",
"author": {
"name": "hknoechel",
"key": "hansknoechel",
"displayName": "Hans Knöchel",
"active": true,
"timeZone": "Europe/Berlin"
},
"body": "[~zozo4kin] We just released 5.4.0.GA today and the ticket was just raised this week. After it is merged, it needs to go through our quality engineering to be tested in detail. The next possible release therefore is 6.0.0, but you can still apply the PR manually to your SDK and patch it. Please see our guides on how to do that, thanks!",
"updateAuthor": {
"name": "hknoechel",
"key": "hansknoechel",
"displayName": "Hans Knöchel",
"active": true,
"timeZone": "Europe/Berlin"
},
"created": "2016-08-11T07:42:59.000+0000",
"updated": "2016-08-11T07:42:59.000+0000"
},
{
"id": "393397",
"author": {
"name": "eharris",
"key": "eharris",
"displayName": "Ewan Harris",
"active": true,
"timeZone": "Europe/Dublin"
},
"body": "Verified using:\r\n\r\nWindows 10 Pro\r\nAppc core: 6.0.0-26\r\nAppc NPM: 4.2.8-5\r\nTi SDK: 6.0.0.v20160817065403\r\n\r\nupdateItemAt now updates the correct item and no longer errors on index 0 when not using headerTitle.\r\n\r\nClosing ticket",
"updateAuthor": {
"name": "eharris",
"key": "eharris",
"displayName": "Ewan Harris",
"active": true,
"timeZone": "Europe/Dublin"
},
"created": "2016-08-17T16:13:49.000+0000",
"updated": "2016-08-17T16:13:49.000+0000"
}
],
"maxResults": 13,
"total": 13,
"startAt": 0
}
}
}