{ "id": "90852", "key": "TIMOB-8880", "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": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2016-11-28T22:10:55.000+0000", "created": "2012-04-25T06:23:43.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-23T21:20:33.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": "h2. Problem \r\n\r\nI am unable to set the {{badge}} on a tab if the tab does not have its {{icon}} set. Giving the tab an icon resolves the issue.\r\n\r\nh2. Test Case\r\n\r\n{code:javascript}\r\nvar tabgroup = Ti.UI.createTabGroup({\r\n\tbackgroundColor: '#fff'\t\r\n});\r\nvar windows = [];\r\nvar tabs = [];\r\n\r\nvar addWindowListener = function(win, tab) {\r\n\twin.addEventListener('click', function(e) {\r\n\t\tif (tab.badge) {\r\n\t\t\ttab.setBadge(null);\t\r\n\t\t} else {\r\n\t\t\ttab.setBadge('23');\r\n\t\t}\r\n\t});\r\n};\r\n\r\nfor (var i = 0; i < 4; i++) {\r\n\twindows.push(Ti.UI.createWindow({\r\n\t\ttitle: 'Window ' + (i+1),\r\n\t\tbackgroundColor: '#a00'\t\r\n\t}));\r\n\ttabs.push(Ti.UI.createTab({\r\n\t\twindow: windows[i],\r\n\t\ttitle: 'Window ' + (i+1),\r\n\t\t\r\n\t\t// removing the 'icon' property below will make the \r\n\t\t// badge fail to appear when you click the window\r\n\t\ticon: 'KS_nav_ui.png'\r\n\t}));\r\n\ttabgroup.addTab(tabs[i]);\r\n\taddWindowListener(windows[i], tabs[i]);\r\n}\r\n\r\ntabgroup.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: setBadge() does nothing on Tab if icon is not set", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OSX 10.7.3\r\nXCode 4.3 & iOS 5.1\r\nTitanium SDK 2.0.1GA2\r\nTiStudio 2.0.1", "comment": { "comments": [ { "id": "247745", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 \nTitanium SDK version: 3.0.2 \niOS iPhone Simulator: iOS SDK version: 6.0", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-16T12:43:48.000+0000", "updated": "2013-04-16T12:43:48.000+0000" }, { "id": "401934", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This is not supposed to work on the native side as well. Tab-badges are attached to their icons and if it's not provided, iOS will ignore the value of the property.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-28T22:10:55.000+0000", "updated": "2016-11-28T22:10:55.000+0000" }, { "id": "415387", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T21:20:33.000+0000", "updated": "2017-03-23T21:20:33.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }