{ "id": "116408", "key": "TIMOB-14360", "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": "15564", "description": "2013 Sprint 15 API", "name": "2013 Sprint 15 API", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "15567", "description": "2013 Sprint 15", "name": "2013 Sprint 15", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "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-07-23T21:30:28.000+0000", "created": "2013-06-25T12:22:08.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "calendar", "ios", "mobilesdk", "ti.api" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:43: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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Calendar-Event-Alert, relativeOffset value set greater than 24 days, does not work correctly when try to get the value.\r\n\r\nSteps to reproduce:\r\n\r\n1: Use the below code and copy paste that in app.js of a sample project.\r\n2: launch the app (simulator/device) and press the calendar button.\r\n3: check the console for Ti.API.info.\r\n\r\nCorrect Result will be printed if value is till 24 days (example value for 24 days).\r\n[INFO] : alert1 before: 604800000 // i set 7 days\r\n[INFO] : alert1 after : -604800000 // i get 7 days\r\n[INFO] : alert2 before: 2073600000 // i set 24 days\r\n[INFO] : alert2 after : 2073600000 // i get 24 days\r\n\r\nif value is greater than 24 days then (example values for 26 days)\r\n[INFO] : alert1 before: 604800000 // i set 7 days\r\n[INFO] : alert1 after : -604800000 // i get 7 days\r\n[INFO] : alert2 before: 2246400000 // i set 26 days\r\n[INFO] : alert2 after : -2147483648 // i get -2147483648 as fixed value.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:\"gray\"\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n\ttitle:\"calendar\",\r\n\ttop:10,\r\n\theight:100,\r\n\twidth:250,\r\n\tleft:10\r\n});\r\n\r\nbtn.addEventListener(\"click\",function(){\r\n\t\r\n\tif (Ti.Calendar.eventsAuthorization == Ti.Calendar.AUTHORIZATION_AUTHORIZED) {\r\n test_alerts();\r\n} else {\r\n Ti.Calendar.requestEventsAuthorization(function(e){\r\n if (e.success) {\r\n test_alerts();\r\n } else {\r\n alert('Access to calendar is not allowed');\r\n }\r\n });\r\n}\r\n\r\nfunction test_alerts()\r\n{\r\n var ical = Ti.Calendar.defaultCalendar;\r\n var start_date = new Date();\r\n\r\nvar event = ical.createEvent({\r\n title: 'Test event1',\r\n begin: start_date,\r\n end: new Date(start_date.getTime() + 15*60*1000),\r\n availability: Ti.Calendar.AVAILABILITY_FREE,\r\n allDay: false\r\n});\r\n\r\nvar millis = 7*24*60*60*1000;\r\nTi.API.info('alert1 before: ' + millis);\r\nvar alert1 = event.createAlert({\r\n relativeOffset:-millis //5 days before\r\n});\r\nTi.API.info('alert1 after : ' + alert1.relativeOffset);\r\n\r\nvar millis2 = 26*24*60*60*1000;\r\nTi.API.info('alert2 before: ' + millis2);\r\nvar alert2 = event.createAlert({\r\n relativeOffset:-millis2 //26 days before,\r\n});\r\nTi.API.info('alert2 after : ' + alert2.getRelativeOffset()); // value should be similar to alert2 before value\r\n\r\nevent.alerts = [alert1, alert2];\r\nevent.save(Ti.Calendar.SPAN_FUTUREEVENTS);\r\n}\r\n\t\r\n});\r\n\r\n\r\nwin.add(btn);\r\n\r\nwin.open();\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: relativeOffSet in Calendar event does not return correct value greater than 2073600000 (24 days in mili seconds)", "creator": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "Titanium Mobile SDK 3.1.0, 3.1.1\r\niOS 6", "comment": { "comments": [ { "id": "262776", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4471", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-23T04:27:52.000+0000", "updated": "2013-07-23T04:27:52.000+0000" }, { "id": "263655", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "@Betty\nAlready fixed and should be available as part of CI on master(3.2)", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-29T16:33:29.000+0000", "updated": "2013-07-29T16:33:29.000+0000" }, { "id": "279511", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified and Closed with environment:\r\n\r\nAppcelerator Studio: 3.2.0.201311122338\r\nSDK:3.2.0.v20131113183932\r\nalloy: 1.3.0\r\nacs: 1.0.7\r\nnpm: 1.3.2\r\ntitanium: 3.2.0\r\ntitanium-code-processor: 1.1.0\r\nXcode:5.0.2\r\nDevice: Iphone 5s(v7.0.2)\r\nOS: Mac OSX 10.9\r\n\r\nWorking as expected in iOS.\r\n\r\n", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-14T07:00:06.000+0000", "updated": "2013-11-14T07:00:06.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }