{
"id": "114788",
"key": "ALOY-667",
"fields": {
"issuetype": {
"id": "1",
"description": "A problem which impairs or prevents the functions of the product.",
"name": "Bug",
"subtask": false
},
"project": {
"id": "11113",
"key": "ALOY",
"name": "Alloy",
"projectCategory": {
"id": "10400",
"description": "Tools for developing applications",
"name": "Tooling"
}
},
"fixVersions": [
{
"id": "15403",
"description": "Alloy 1.3.0",
"name": "Alloy 1.3.0",
"archived": false,
"released": true,
"releaseDate": "2013-12-20"
},
{
"id": "15816",
"description": "2014 Sprint 02",
"name": "2014 Sprint 02",
"archived": true,
"released": true,
"releaseDate": "2014-01-31"
}
],
"resolution": {
"id": "1",
"description": "A fix for this issue is checked into the tree and tested.",
"name": "Fixed"
},
"resolutiondate": "2014-01-21T19:58:40.000+0000",
"created": "2013-05-22T20:00:34.000+0000",
"priority": {
"name": "Medium",
"id": "3"
},
"labels": [
"alloy",
"contacts",
"qe-closed-3.3.0"
],
"versions": [],
"issuelinks": [],
"assignee": {
"name": "tlukasavage",
"key": "tlukasavage",
"displayName": "Tony Lukasavage",
"active": true,
"timeZone": "America/Los_Angeles"
},
"updated": "2014-06-19T09:21:03.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": "*Problem*\r\nIf you have an alloy view with two buttons with the same ID, specifically for the use case of platform-specific buttons, e.g.:\r\n\r\n{code:xml}\r\n\r\n\r\n{code}\r\n\r\nAnd you open this window, then you open the contacts window via Ti.Contacts.showContacts() a couple unusual behaviors occur:\r\n1. clicking \"Cancel\" triggers the cancel event but the window itself doesn't close\r\n2. clicking a row triggers the row's click event but the window itself doesn't close\r\n3. when the search bar has focus, typing doesn't have text show up in the window.\r\n\r\nIf the button doesn't have an ID on it, this behavior doesn't occur.\r\n\r\n*Steps to reproduce*\r\n1. Create a new standard Alloy project and drop in the app folder contents from the zip\r\n2. Run on iOS 6 simulator and observe behavior described above\r\n3. Try changing the id of one of the buttons to something else, observe that all the behavior described above is fixed",
"attachment": [
{
"id": "38902",
"filename": "app.zip",
"author": {
"name": "taskle",
"key": "taskle",
"displayName": "David Murray",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2013-05-22T20:00:34.000+0000",
"size": 3687266,
"mimeType": "application/zip"
}
],
"flagged": false,
"summary": "Alloy: having a button (one for each platform) with same ID causes Ti.Contacts.showContacts() weirdness",
"creator": {
"name": "taskle",
"key": "taskle",
"displayName": "David Murray",
"active": true,
"timeZone": "America/Los_Angeles"
},
"subtasks": [],
"reporter": {
"name": "taskle",
"key": "taskle",
"displayName": "David Murray",
"active": true,
"timeZone": "America/Los_Angeles"
},
"environment": "iOS",
"comment": {
"comments": [
{
"id": "253515",
"author": {
"name": "dsefton",
"key": "dsefton",
"displayName": "Daniel Sefton",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "Tested and confirmed on iOS 6 simulator with Ti SDK 3.1 GA and latest 3.2 CI.\n\nI'm not sure whether this is a bug with the SDK, or Alloy, but since ids are Alloy-specific, I'll move it there first.",
"updateAuthor": {
"name": "dsefton",
"key": "dsefton",
"displayName": "Daniel Sefton",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2013-05-22T22:05:08.000+0000",
"updated": "2013-05-22T22:05:08.000+0000"
},
{
"id": "288839",
"author": {
"name": "skypanther",
"key": "skypanther",
"displayName": "Tim Poulsen",
"active": true,
"timeZone": "America/New_York"
},
"body": "Tested with 3.2.0.GA and Alloy 1.3.0. No issues found.\r\n\r\nTest procedure\r\n\r\n1. Create an alloy app with the following code:\r\n\r\n{code}\r\n\r\n \r\n\t\t\r\n\t\t\r\n \r\n\r\n{code}\r\n\r\n2. Build for iOS simulator and Android emulator\r\n3. No build errors, no runtime errors, only one button present on each platform",
"updateAuthor": {
"name": "skypanther",
"key": "skypanther",
"displayName": "Tim Poulsen",
"active": true,
"timeZone": "America/New_York"
},
"created": "2014-01-20T16:54:58.000+0000",
"updated": "2014-01-20T16:54:58.000+0000"
},
{
"id": "289040",
"author": {
"name": "skypanther",
"key": "skypanther",
"displayName": "Tim Poulsen",
"active": true,
"timeZone": "America/New_York"
},
"body": "I didn't test this properly. Reopening.",
"updateAuthor": {
"name": "skypanther",
"key": "skypanther",
"displayName": "Tim Poulsen",
"active": true,
"timeZone": "America/New_York"
},
"created": "2014-01-21T16:38:57.000+0000",
"updated": "2014-01-21T16:38:57.000+0000"
},
{
"id": "289041",
"author": {
"name": "skypanther",
"key": "skypanther",
"displayName": "Tim Poulsen",
"active": true,
"timeZone": "America/New_York"
},
"body": "I can confirm that the cancel button is non-functioning.\n\nTest procedure:\n\n 1. Create a new Alloy project\n 2. Download & unzip the attached app.zip, copy its app folder over the one in your new alloy project\n 3. Update modal.xml with the following to replace NavigationGroup with NavigationWindow. \n 4. Build for the iOS Simulator. \n 5. Click Show Modal, then click Show Contacts.\n 6. Clicking Cancel triggers the cancel event but doesn't close the window. Click a name and the details window opens as expected. At the contacts list screen, searching for a contact doesn't find any regardless of the text you enter.\n 7. To fix the cancel button problem, either remove the button ids or change them to be unique (e.g. btnFooIOS and btnFooAndroid). This doesn't fix the searching though.\n\n{code}\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\n{code}",
"updateAuthor": {
"name": "skypanther",
"key": "skypanther",
"displayName": "Tim Poulsen",
"active": true,
"timeZone": "America/New_York"
},
"created": "2014-01-21T16:53:11.000+0000",
"updated": "2014-01-21T16:53:11.000+0000"
},
{
"id": "289066",
"author": {
"name": "skypanther",
"key": "skypanther",
"displayName": "Tim Poulsen",
"active": true,
"timeZone": "America/New_York"
},
"body": "To answer Daniel's question, I don't believe this behavior could be a bug in the SDK because it doesn't support platform-specific components in the way Alloy does. The app below works properly whether you assign an id to the button or not, which is about the best I can do to simulate the situation in traditional code.\n\n{code}\nfunction showContacts(e) {\n Ti.Contacts.showContacts({\n cancel: function (e) {\n Ti.API.info('Cancel clicked');\n }\n });\n};\n\nvar win = Titanium.UI.createWindow({ \n backgroundColor:'#fff'\n});\nvar btn = Ti.UI.createButton({\n title: 'Show Modal'\n});\nbtn.addEventListener('click', function(e){\n var childwin = Titanium.UI.createWindow({\n title: 'Modal'\n });\n var btn1 = Ti.UI.createButton({\n title: 'Show Contacts',\n id: 'btnFoo'\n });\n btn1.addEventListener('click', showContacts);\n childwin.add(btn1);\n var welcomeNav = Titanium.UI.iOS.createNavigationWindow({\n window: childwin\n });\n welcomeNav.open({\n modal: true,\n animated: true\n });\n});\n\nwin.add(btn);\n\nwin.open();\n{code}",
"updateAuthor": {
"name": "skypanther",
"key": "skypanther",
"displayName": "Tim Poulsen",
"active": true,
"timeZone": "America/New_York"
},
"created": "2014-01-21T18:38:36.000+0000",
"updated": "2014-01-21T18:38:36.000+0000"
},
{
"id": "289098",
"author": {
"name": "tlukasavage",
"key": "tlukasavage",
"displayName": "Tony Lukasavage",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "PR: https://github.com/appcelerator/alloy/pull/303\r\ntest app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-667\r\n\r\nFunctional test is to follow the instructions defined above in the comments. In addition, you can check the attached test app with the following steps:\r\n\r\n# run the app\r\n# click the shows contacts button\r\n# ensure that each click of the button shows only one messages in the console log.\r\n\r\nPrior to this fix, each message would be printed twice.",
"updateAuthor": {
"name": "tlukasavage",
"key": "tlukasavage",
"displayName": "Tony Lukasavage",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2014-01-21T19:58:40.000+0000",
"updated": "2014-01-21T19:58:40.000+0000"
},
{
"id": "309810",
"author": {
"name": "pmishra",
"key": "pmishra",
"displayName": "Paras Mishra",
"active": true,
"timeZone": "Asia/Kolkata"
},
"body": "Verified using Tony's steps , console logs are printed once,\r\nAlso verified using code on iOS and Android\r\n{code}\r\n\r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nVerified fix on:\r\nDevice : iPhone 5s , iOS version : 7.1.1\r\nSDK: 3.3.0.v20140617161713\r\nCLI version : 3.3.0-rc\r\nOS : MAC OSX 10.9.2\r\nAlloy: 1.4.0-rc\r\nACS: 1.0.14\r\nnpm:1.3.2\r\nLiveView: 1.0.4\r\nAppcelerator Studio, build: 3.3.0.201406171619\r\ntitanium-code-processor: 1.1.1\r\nXCode : 5.1.1",
"updateAuthor": {
"name": "pmishra",
"key": "pmishra",
"displayName": "Paras Mishra",
"active": true,
"timeZone": "Asia/Kolkata"
},
"created": "2014-06-19T09:20:48.000+0000",
"updated": "2014-06-19T09:20:48.000+0000"
}
],
"maxResults": 7,
"total": 7,
"startAt": 0
}
}
}