{ "id": "165254", "key": "TIMOB-24292", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2017-02-16T09:43:22.000+0000", "created": "2017-01-11T12:36:56.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "bloat" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-08-02T22:20:01.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" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" }, { "id": "12642", "name": "Windows", "description": "Windows authoring support" }, { "id": "15101", "name": "Windows phone", "description": "Windows phone platform" } ], "description": "Ti.App.Properties currently has a load of bloat functions which do not add anything but confusion.\r\n\r\nI suggest using a plain function like:\r\n\r\n`Ti.App.Properties.set('myKey', mixedValue)`;\r\n`Ti.App.Properties.get('myKey');` (will then return either an object/array/string/number, depending on what you've set).\r\n\r\nAnd discard all functions like `setList`, `setObject`, `setString`, `getList`, `getObject`, `getString`.\r\n\r\nAlso instead of having `Ti.App.Properties.removeAllProperties()`, we should aim for a concise naming like `Ti.App.Properties.clear()`. We are already in the Properties namespace so no need to repeat it in any of it's functions.", "attachment": [], "flagged": false, "summary": "Rewrite Ti.App.Properties to a simpler form", "creator": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "environment": "Any", "closedSprints": [ { "id": 1058, "state": "closed", "name": "2018 Sprint 16 SDK", "startDate": "2018-07-29T22:26:06.486Z", "endDate": "2018-08-12T22:26:00.000Z", "completeDate": "2018-08-13T17:38:16.757Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "407085", "author": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "body": "Simple but effective hack for your own project:\r\n\r\n{code}\r\nAlloy.Globals.Properties.set = function(key, val) {\r\n return Ti.App.Properties.setString(key, JSON.stringify(val));\r\n}\r\n\r\nAlloy.Globals.Properties.get = function(key, default) {\r\n var val = Ti.App.Properties.getString(key);\r\n if(val === undefined) {\r\n return default;\r\n }\r\n return JSON.parse(val);\r\n}\r\n{code}\r\n\r\nObviously this has a much better place in the SDK itself, but this does the job, and works correctly on objects, strings, numbers and booleans.\r\n", "updateAuthor": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "created": "2017-02-15T10:47:40.000+0000", "updated": "2017-02-15T10:52:25.000+0000" }, { "id": "407171", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The {{Ti.App.Properties}} namespace is meant to handle types specifically, that's why the getString, getInt, getBoolean, etc. were introduced. There are no plans to change this behavior, since it would bring no functional benefit for the users, but would require a major code-rewrite to all platforms, as well as for the developers using our API's.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-16T09:43:22.000+0000", "updated": "2017-02-16T09:43:22.000+0000" }, { "id": "407177", "author": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "body": "It would bring functional benefit to the programmer. However I can see it being an issue since this likely has to do with the way it is being saved on the native side.\r\n\r\nThe current setup does bring confusion to the situation though since one can do *Ti.App.Properties.getBoolean('foobar')* and *Ti.App.Properties.getString('foobar')*. I currently have no clue what happens in this case, if you save the same variable name to different types.", "updateAuthor": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "created": "2017-02-16T09:54:01.000+0000", "updated": "2017-02-16T09:54:01.000+0000" }, { "id": "439716", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing old \"Won't fix\" tickets. If you disagree, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-02T22:20:01.000+0000", "updated": "2018-08-02T22:20:01.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }