{ "id": "165017", "key": "TIMOB-24464", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-05-02T00:13:27.000+0000", "created": "2016-12-14T17:26:17.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-02-21T10:41:53.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" } ], "description": "On my test device, there are 15 calendars, some are duplicates (via being linked through different google accounts on the same device), and some are not duplicates.\r\n\r\nLet X be the events returned from the first calendar. When executing the \"Ti.Calendar.Calendar.getEventsBetweenDates\" method on all calendars, they all return X. This is problematic, because we then cannot differentiate between which Calendars from which data is being pulled. A use cannot exclude certain calendars from being consumed by the application, which is a major issue.\r\n\r\nNOTE: On iOS, this exact same scenario and code results in the proper data being returned from the specific Calendars.", "attachment": [], "flagged": false, "summary": "Android: Ti.Calendar.Calendar.getEventsBetweenDates returns same events for all calendars", "creator": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "subtasks": [], "reporter": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "environment": null, "comment": { "comments": [ { "id": "403455", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Please share a sample code to test the issue.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-12-15T20:49:25.000+0000", "updated": "2016-12-15T20:49:25.000+0000" }, { "id": "403460", "author": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "body": "{code:javascript}\r\n// Step 0: Get Permission for calendar access on Android device\r\n\r\n// Step 1: Get All Calendars for Android Device\r\n\r\n// Step 2: Loop over calendars for Android Device\r\n\r\nvar events_between_dates = current_calendar_object.getEventsBetweenDates(start_date, end_date);\r\n\r\nTi.API.log('number of events between date: ' + events_between_dates.length'); // Observe that the number of events between dates is the same for all calendars. The events are also all the same.\r\n\r\n{code}", "updateAuthor": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "created": "2016-12-15T23:32:30.000+0000", "updated": "2016-12-15T23:33:40.000+0000" }, { "id": "403742", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Your sample code is not sufficient enough. Please attach a sample project that regenerates the issue. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-12-21T16:22:04.000+0000", "updated": "2016-12-21T16:22:04.000+0000" }, { "id": "409795", "author": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "body": "Sharif, this was unnecessarily closed, and I was not about to rewrite an entire test application for you.\r\n\r\nIt's an easy check to see (by using your sample code from the Appcelerator documentation site) that the calendars yield the same results, even if you specify them explicitly. In my case, no matter if I chose 1 or 15 calendars, it still yielded the same result.\r\n\r\nSee line 240 of EventProxy.java in the titanium_mobile SDK.\r\n\r\n`return queryEventsBetweenDates(date1, date2, null, null);`\r\n\r\nshould actually be\r\n\r\n`return queryEventsBetweenDates(date1, date2, \"calendar_id=\" + calendar.getId(), null);`\r\n\r\nI'm not submitting a PR and all of that jazz for this, because it can be resolved by one of you quite quickly.\r\n\r\nThere's your answer, I made the change myself in my customized SDK and it works fine.", "updateAuthor": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-03-08T04:46:42.000+0000", "updated": "2017-03-08T04:46:42.000+0000" }, { "id": "409817", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Reopening issue, it's valid and reproducible.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-08T13:24:53.000+0000", "updated": "2017-03-08T13:24:53.000+0000" }, { "id": "409818", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Community-PR: https://github.com/appcelerator/titanium_mobile/pull/8867", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-08T13:25:43.000+0000", "updated": "2017-03-08T13:25:43.000+0000" }, { "id": "409821", "author": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "body": "Thanks", "updateAuthor": { "name": "Yrkh8trnoy", "key": "yrkh8trnoy", "displayName": "Kiley Williams", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-03-08T13:35:31.000+0000", "updated": "2017-03-08T13:35:31.000+0000" }, { "id": "418544", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed for 6.2.0.\r\nNeed a backport for 6.1.0.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-02T00:14:06.000+0000", "updated": "2017-05-02T00:14:06.000+0000" }, { "id": "419410", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (6_1_X): https://github.com/appcelerator/titanium_mobile/pull/9042", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-05-09T20:47:47.000+0000", "updated": "2017-05-09T20:47:47.000+0000" }, { "id": "419731", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with 6.1.0.v20170514022959 & 6.2.0.v20170512073825.\r\n{{calendar.getEventsBetweenDates}} returns correct number of events.\r\n\r\nClosing.\r\n\r\nStudio Ver: 4.9.0.201705110256\r\nSDK Ver: 6.1.0.v20170514022959\r\nOS Ver: 10.12.3\r\nXcode Ver: Xcode 8.3.2\r\nAppc NPM: 4.2.9\r\nAppc CLI: 6.2.1\r\nTi CLI Ver: 5.0.13\r\nAlloy Ver: 1.9.11\r\nNode Ver: 6.10.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Nexus 6 --- Android 6.0.1\r\n ⇨ google Nexus 6P --- Android 7.1.1\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-15T20:37:20.000+0000", "updated": "2017-05-15T20:37:20.000+0000" }, { "id": "434700", "author": { "name": "michielve", "key": "michielve", "displayName": "Michiel van Eerd", "active": true, "timeZone": "Europe/Berlin" }, "body": "On SDK 7.0.2.GA all events have the same id when calling getEventsBetweenDates(). When calling getEventsInDate() the have the correct id's.", "updateAuthor": { "name": "michielve", "key": "michielve", "displayName": "Michiel van Eerd", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-02-21T10:41:53.000+0000", "updated": "2018-02-21T10:41:53.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }